Real-time virtualisation

Paul Boughton

Microprocessor roadmaps clearly show a trend towards multiple core CPUs. Modern operating systems already make use of these CPU architectures by distributing tasks between processing cores thereby increasing system performance. The next logical stepnot only from a performance standpoint but also from a cost standpointis virtualisation where multiple operating systems execute in parallel both securely and independently on separate cores.

Execution of multiple operating systems on a single hardware platform is nothing new. In the IT or server domainsvirtualisation solutions such as VM-Ware or Xen have been used successfully. New solutions are being introduced frequently and virtualisation seems to be the buzz word of the industry.

One case for virtualisation is the possibility to safely distribute applications or data over separate protected operating system instances. Virtualisation also makes perfect sense if different operating systems are to be used in parallelfor exampleMicrosoft Windows and Linux. In many cases only virtualisation allows an intelligent utilisation of the constantly increasing computing power of modern microprocessors.

Industrial controllersmedical devices or test and measurement applications have very similar requirements to server and IT domains. In each of these applicationsthe real-time data collectionprocessing and control tasks should be separated from the non time-critical tasks such as the user interfacedatabase communication or an open internet connection.

Typicallythis task separation is fulfiled using multiple operating systems on separate dedicated hardware platforms. A microcontroller hosts the real-time operating system (RTOS) and handles all real-time requirements and a PC-based system runs a general purpose operating system (GPOS)such as Microsoft Windows or Linuxto take care of the graphical user interfaces and connectivity duties. Additionallyin these applications the GPOS rarely uses all the power of a modern x86 processor. Using virtualisation would be the natural choiceespecially in this case because the cost of additional microcontroller based hardware could be eliminated.

So why has virtualisation not been used in real-time and embedded applications? One of the main reasons is the real-time performance requirement. Traditionallyvirtualisation technology uses various ‘tricks’ to simulate separate virtual PCs for each operating system. Hardware is often at least partially emulated or given exclusively to a single operating system to manage. Alsoprocessing time is rotatedin turnamong the individual operating systems in the form of time-slicing. In contrastan RTOS requires direct hardware access and processing of interrupts must occur without added delays. Time-slicing would hinder the real-time performance just as much as emulating hardware or trapping and redirecting the instructions of the processor. For these reasonsspecialised virtualisation technology known as Real-Time Hypervisors has been developed to address both these real-time and general purpose requirements on multi-core processors.

This new technology enables a combination of GPOSes and RTOSes as well as multiple instances of the same or different RTOSes. A Real-Time Hypervisor partitions a multi-core x86 system into individual and independent hardware platforms. Each operating system owns one or multiple processor cores. If an operating system supports Symmetric Multi Processing (SMP) then all allocated cores are utilised.

A Real-Time Hypervisor also partitions available memory and assigns it to the individual operating systems. Hardware devicessuch as PCI or legacy devicesare individually configured so interrupts are routed directly to a specific operating system.

A Real-Time Hypervisor operating system boot sequence is specified beforehand. Individual processor cores or operating systems can be rebooted while the remaining operating systems continue to be fully operational. Each operating system instance has to be fully independent from the others. It's also very important for real-time applications to isolate the functionality of the Real-Time Hypervisor so that it is independent from any of the operating systems thereby guaranteeing safe operation. Using shared memory areas is common practice in order to easily exchange data between operating systems along with a virtual TCP/IP based network for seamless socket based communication.

Deployment of multiple operating systems on multi-core processor platforms is a logical step in embedded systems design and reduces total hardware costs while increasing reliability and system performance.

With multi-core technology like the Intel Core Duo now available on embedded computer modulesa new dimension in modularity and flexibility in industrial applications has been reached.

While I/O interfaces are migrating from parallel to fast serial interfacesvendors of microprocessors are taking the opposite direction. Having reached 64-bit architectures the potential of increasing performance appears to be reaching its limit. Simply increasing processor clock speeds is possible but comes at the cost of exponentially increased power consumption. In contrastparallelisation bears almost a linear increase of performance. Multi-processor solutions have been offered since the early nineties but due to a lack of software support they never flourished. Now several operating systems offer multi-processor support with minimal overhead and furthermorevirtualisation technology has been developed to support multiple operating systems on a single processor.

Industrial applications typically require specialised computer systems. Office computers do not offer the industry specific interfaces or are not designed to withstand a rugged industrial environment. Due to thiscustom embedded PCs are being specified that are tailored to meet the specific needs of the application. One solution that has been designed to keep research and development efforts low and increase flexibility are Computer-On-Modules (COM). These standardised modules contain full PC functionality and are installed on an application specific carrier board with industrial board-to-board connectors. Specialised components normally not found on a PCfor instance motor motor control devicesindustrial I/O busesspecial power supplies or simply additional connectorsare now located on customised carrier boards.
Due to the modular conceptan existing single core solution can quickly be upgraded into a current dual core system by simply replacing the module.

Gerd Lammers is a CEO of Real-Time Systems GmBHand is Christian EderMarketing Manager of Congatec AG.

"

Recent Issues