Work-In-Progress: Real-Time RPC for Hybrid
Dual-OS System
Pan Dong
12
Zhe Jiang
1
Alan Burns
1
Yan Ding
2
Jun Ma
2
1
Computer Science Department, University of York, YO10 5GH, UK
2
School of Computer, National University of Defense Technology, Changsha, Hunan Province, P.R.China
Abstract—For the power and space sensitive systems such as
automotive/avionic computers, an important trend is isolating
and integrating multiple Operating Systems (OSs) in one physical
platform, which is named as hybrid multi-OS system. Generally,
in a commonly used hybrid dual-OS system, a RTOS (real-
time operating system) and a GPOS (general-purpose operating
system) are integrated. Cooperation (among the OSs) is a vital
feature of a hybrid system to obtain the necessary capabilities,
and inter-OS communication is the key. However, it is difficult
to satisfy the real-time metrics of inter-OS communication
required by the RTOS, due to the uncertainty in communication
maintenance and the time-sharing policy of the GPOS. This paper
aims to build a time predictable and secure RPC mechanism (i.e.,
the primary and critical communication unit in a hybrid multi-
OS system). Afterwards, a real-time RPC scheme (termed RTRG-
RPC) is proposed, which is applied to a ready-built TrustZone-
based hybrid dual-OS system (i.e., TZDKS). RTRG-RPC achieves
accurate time control through three mechanisms: SGI message
transforming, interrupt handler RPC servicing, and priority-
swapping. Evaluations show that RTRG-RPC can achieve real-
time predictability and can also reduce priority inversion.
I. INTRODUCTION
A major trend in automotive/avionic system is the consol-
idation of multiple domains on single powerful SoCs [1], in
order to optimize cost, space, weight, heat generation, and
power consumption. The up-to-date ARINC 653 [9] specifica-
tion requires integrating flight control systems, environment
control systems, and amusement systems into a virtualized
platform on modern aircraft. Meanwhile, AUTOSAR 4.0+ [1]
proposes ECUs (Electronic Control Units) consolidation in a
car based on virtualization. Even more, the consolidation of
ECUs, ADAS (Advanced Driver-Assistance System) and IVIS
(In-Vehicle Information System) subsystems will be the final
target [1]. Therefore, the final platform is a hybrid system
with different characteristics, and is termed as hybrid multi-
OS system in some research [11]. A popular candidate for
consolidation is isolating the sub-system into the different
run-time environments (e.g., virtualization [6] – running each
sub-system in independent virtual machines). However, this
method significantly conflicts with the requirements on re-
source efficiency and predictability, due to the introduction of
complicated resource management and complex access paths
[5], [7]. The other method is building the sub-systems in the
isolated environment provided as the extension by the SoC
hardware, such as ARM TrustZone. For example, TZDKS
[2] and LTZVisor [8] proposed multi-OS architectures upon
TrustZone, which achieve better system performance.
The simplest form of a hybrid multi-OS system is the
composition of a real-time OS (RTOS) and a general-purpose
OS (GPOS), i.e., a hybrid dual-OS system. However, the con-
solidation is not merely a simple composition of OSs. Because
both OSs will benefit from the inter-operations in terms of
functions and performance, we can get a new system with the
result one plus one is greater than two. Take the automotive
as an example, with the assistance of inter-operation, the ECU
cluster in the RTOS can acquire abundant functionalities (such
as fault logs, cloud-side AI decision, etc.) from the IVIS in
the GPOS [10]. In a hybrid multi-OS system, communication
is the foundation of inter-operation, and RPC has become a
fundamental mechanism [10]. Security and efficiency are the
two most important metrics for communication [2]. We note
that the time predictability for communication is necessary, be-
cause the scheduler should be able to predict the duration time
of the communication on the RTOS part. As far as we know,
there is very few literature addressing such problems,which
may be a significant obstacle to promote the development of
the hybrid multi-OS system.
The contributions of this paper are summarized as:
• A RPC model for the time and security analysis in the
hybrid multi-OS system.
• A Real-Time RTOS-GPOS RPC protocol (i.e., RTRG-
RPC) on TZDKS [2], with three main mechanisms: SGI
(Software Generate Interrupt) messages transforming, in-
terrupt handler RPC serving, and priority-swapping.
• Performance evaluation, showing real-time predictability
and reduced priority inversion by RTRG-RPC.
II. RELATED WORK
A. Inter-OS Communication
Current inter-OS communication mechanisms are mostly
designed for virtualization systems. The default method is
to route messages via the standard network interface. This
offers the highest amount of isolation, yet provides the lowest
performance. Many improvements simplify the under protocol
stack, and use shared-memory to increase the performance [4].
Examples include XenLoop, MemPipe [13], etc. Another
effort is to design straightforward RPC with direct hardware
assistants. XENRPC [3] is a product of such an idea. In
some dual-OS systems, the characteristics of a special platform
are leveraged to build efficient communication. As shown in
the design of SafeG [10], efficient dual-OS communication