SYSTEM INTEGRATION
Virtualization
Getting a Handle on Virtualization and Putting it to Work
Virtualization in embedded systems can offer a range of advantages from hosting different operating systems on a multicore processor, to isolating hardware resources for a given OS, to emulating obsolete devices and more.
PAUL FISHER, TENASYS
Virtual memory, virtual storage, virtual hardware, virtual I/O, virtual systems, virtual functions, virtual machine monitor… Are these devices part of a virtual reality where we live and work in virtual worlds with our virtual colleagues, friends and pets? That might depend on how you define your friends!
There are many ways to use the term “virtual” in the context of computing systems. The term is heavily overloaded, with many specific meanings, but all of them emanate from a sense of being “real without being actual, ideal without being abstract.” French philosopher Gilles Deleuze described the concept of virtual as “that [which] every object carries with it, which is neither its reality, nor merely what it could have been, but rather what it is imagined to be.” In other words, a virtual system is what we make of it. Thus is the challenge of applying virtualization technology to real-time embedded systems. Stray too far from reality and you compromise performance and determinism. Stay too close to home and you will never reap the benefits.
Virtualization for Servers
Much of the information available about virtualization revolves around the use of a hypervisor also known as a virtual machine manager (VMM) for consolidation of multiple physical servers onto a single hardware platform. The obvious benefit is cost reduction brought about by using less hardware and decreasing energy consumption. Other benefits include the ability to quickly reconfigure and redeploy virtual servers on different physical hardware platforms as a function of loading and performance.
In server applications the VMM presents a standard set of virtual hardware to each guest OS (the operating system running inside the virtual machine). For example, the network interface card (NIC) presented by a server VMM might always appear to be an NE2000 network card. The I/O is defined by the server VMM, regardless of whether your real hardware is a 3Com, Realtek, or Brand X NIC.
The server VMM translates all I/O requests inside your guest OS into real I/O access to real hardware. This virtual to real translation happens for sound cards, keyboards, mice, etc. Limiting the size and scope of the virtual hardware presented to the guest OS makes it easy to support a range of real hardware platforms and without constraining the amount of I/O needed to support common server applications.
Hypervisor technology is becoming part of the server operating systems in the form of VMware ESX Server, Citrix XenServer and Microsoft Hyper-V. If you’re consolidating multiple servers this is good news. But these hypervisors are not appropriate if your application is embedded and you require real-time services or access to special hardware.
Virtualization for Embedded Applications
The server VMM is targeted at solving problems for corporate IT networks by maximizing the use of server resources and simplifying deployment and maintenance. A server VMM can’t easily accommodate providing a variety of specialized hardware devices to the guest OS because it is trying to present the application with a standard “white box.” Unfortunately, this approach doesn’t work well for embedded applications, where predictable performance and the need to interact with unusual and special hardware are paramount.
Embedded developers need a different approach to virtual machine management to support their specific I/O hardware needs and to simultaneously provide the performance needed for a deterministic environment. Such an approach requires a VMM that assigns hardware directly to the applications and drivers that control them, as illustrated by Figure 1.

A key difference between the embedded VMM model and the server VMM model is how physical resources are allocated to each virtual machine. The embedded VMM model partitions CPU cycles, RAM and I/O between each guest OS rather than multiplexing those resources among the virtual machines, as is the case with a server VMM. This AMP (asymmetric multiprocessing) model of resource allocation is useful where determinism and performance are more important than equal access and maximum hardware utilization. The virtualization technology built into many of the multicore processors available today can be used to isolate resources for use by a specific virtual machine and its guest OS.

Kontron
Interphase