Article Preview
TopIntroduction
Virtualization technology allows multiple virtual machines (VMs) to co-exist on the same computing platform. VMs are isolated replicas of the real machine accomplished by a software layer called a hypervisor or Virtual Machine Monitor (VMM). Virtualization is being widely adopted in servers and cloud computing platforms. Lately, it is being used in embedded systems in the areas of automobiles, smartphones, industrial automation, etc. (Gu and Zhao, 2012). The real-time performance of these systems is important in the embedded domain.
A recent trend in embedded systems is a change from single-core processors to multi-core processors, which allows parallel execution of code. Multicore processors provide isolated computing cores, but the remaining hardware resources memory, buses, I/O are shared among the cores, thereby raising concerns about security and performance. By introducing a hypervisor or VMM layer, multiple isolated VMs can be created on the same system. Virtualization was originally designed for enterprise systems targeting general-purpose (GP) applications and hence its performance in real-time systems needs to be analyzed.
Use cases of real-time (RT) virtualization architectures (Kiszka, 2009) are seen in industrial control systems, where the time-critical activities of machines are handled by RTOS, whereas the graphical software is controlled by GPOS. Another example is in smartphones where the radio communication part is managed by RTOS, while the smartphone applications are managed by GPOS. In the automotive industry, new features are introduced by adding new Electronic Control Units (ECU). Over time, the number of ECU has increased, and this has resulted in a highly complex system with difficulty to manage along with underutilization of resources (Herber, 2016). Many innovations like autonomous driving features in cars require systems with high computing resources. Also, modern cars are no longer isolated systems and are integrated to the cloud or other cyber-physical systems. A camera in a car needs to process data in real-time and take appropriate control decisions. Here, virtualization helps to integrate different functionalities into a single system, thus helping in reducing the number of ECUs and their wiring overhead.
Recent embedded devices consist of multi-core processors and have increased computing power. The legacy RTOS written for uniprocessor systems needs to utilize the capability of these multicore processors. To meet the requirements of today’s world and to make use of the additional computing capabilities of the embedded systems, either the functionalities of RTOS need to be extended or the GPOS needs to incorporate some RT features. Embedded systems are proceeding towards exploiting virtualization technology to have the benefits of RTOS and GPOS on the same system. This combination provides both a timely, deterministic behavior and a general-purpose application codebase. Virtualization was originally designed for enterprise systems targeting general purpose applications and hence the RT responsiveness of RTOS running inside a VM is still a concern and it is necessary to analyze and tune the performance.
The contributions of this paper are: (1) The real-time performance of KVM virtualization architecture is analyzed on a multicore system. Different real-time tuning measures are proposed to reduce the latency of the RT process on the RT guest VM and the performance with different tuning measures is analyzed. The effect of these tuning measures on non real-time tasks is also analyzed. (2) As part of this work a VM resource monitoring tool named ‘VM_stat’ is developed to obtain the resource usage of each thread in guest VMs. Using this tool, one could easily acquire the process details, overloaded CPUs, scheduling information, etc. Information from such a tool is necessary to tune the system appropriately.