Embedded Virtualization — the key to Real-time Determinism in Multi-OS Systems

By Kim Hartman, TenAsys Corporation

Virtualization is a commonly used term, but not all virtualization is the same. If not implemented correctly in embedded applications, performance and reliability will suffer and your design goals may not be met.

The key difference between embedded applications and office or enterprise computer systems is the need for determinism. Generalpurpose virtualization approaches, such as those that enable servers to run multiple copies of the same general purpose operating system (GPOS), frequently virtualize the entire machine environment with the goal of maximizing the utilization of the CPU. Unfortunately, this comes at the expense of responsiveness to external events, making this approach unusable for time-critical applications.

In contrast, embedded virtualization is engineered to respond to hardware-generated signals deterministically. It does this by partitioning the platform for GPOS and real-time operating system (RTOS) use, only virtualizing what is required. This enables real-time events to be serviced within the required timing, while the GPOS keeps running in its usual way.

The release of the Intel® 80386 processor twenty years ago introduced support in the hardware to make switching the context of tasks more reliable and easy to implement. A group of engineers, some of whom are still with TenAsys today, devised ways of using that feature to make DOS, the most popular GPOS at the time, run alongside the iRMX real time operating system. That day the concept of real-time embedded virtualization was born. Even with the HW features, most of what was achieved was done through a technique called para-virtualization, an adaption of the OSes and drivers to allow them to work together.

As GPOSes evolved and DOS was replaced by Windows as the desktop market leader, it became increasingly evident that GPOSes like Windows were never designed to service events with a fixed priority and hence could not respond deterministically to real-time control of machines. Even with faster processors, Windows can not be counted on to respond to external events with predictable timing.

Some software vendors have attempted to deal with Windows’ lack of determinism by developing special Windows drivers that do I/O processing along with responding to hardware interrupts, but these techniques have proved unreliable and typically must be re-engineered each time a new version of Windows comes out.

To solve the problem of getting real-time tasks and Windows to co-reside on an embedded system, the para-virtualization techniques that had worked with DOS were evolved to run updated RTOSes, like TenAsys’ INtime, alongside Windows to maintain the integrity of the real-time environment and get the benefit of the highly evolved graphical interface that Windows provides.

As the software evolved, so did the support for virtualization that is built into the underlying processor hardware. Intel has added a set of hardware assists called Intel® Virtualization Technology to their processors which are used to accelerate the performance of virtualization software.

Using these techniques and hardware aids, embedded virtualization software partitions resources, such as CPU cores (in the case of today’s multi-core systems), RAM, interrupts, and I/O, between RTOSes and GPOSes. Only shared and emulated resources need to be virtualized. Each OS is guaranteed direct physical access to its dedicated I/O, interrupts, RAM and CPU cycles. The RTOS I/O response cycles take absolute priority, without placing any limits on the functionality of the Windows side of the system.

In multi-core processor systems, the virtualization manager can give the real-time software guaranteed ownership of a CPU core – delivering maximum performance and removing the requirement that the RTOS be designed specially to work with Windows. With the proper embedded virtualization software, virtually any RTOS can work alongside Windows without the need for making any modifications to the RTOS or legacy real-time application software that has been designed to run with it.

Now, embedded system products that used to incorporate separate computers for real-time and general-purpose processing can be implemented using a single processor platform. This will revolutionize the way that embedded systems are built, saving costs and improving system reliability and performance.

Kim Hartman is VP of Sales & Marketing at TenAsys, serving the embedded market with HW analysis tool and RTOS products for 25 years. Kim has recently been a featured speaker for Intel and Microsoft on the topic of embedded virtualization. He is a Computer Engineering graduate of University of Illinois, Urbana-Champaign and degreed MBA professional of Northern Illinois University.