RTOS, full virtualization for real-time systems, DO-178B and hypervisor for the most demanding embedded operating system applications...

Virtualization Makes Better use of Open-Source OSes and appsSecure virtualization for real-time, Linux and Windows systems

PRINTABLE PDF VERSION (173 kB)

ORIGINALLY PUBLISHED IN EE TIMES, MARCH 2009
Author: Robert Day, LynuxWorks™, Inc.

The increased use of software virtualization in embedded systems is allowing additional use of open-source operating systems and applications.

Figure 1: Notional architecture of a VMM environment

The increased use of software virtualization in embedded systems is enabling additional use of open-source operating systems (OSes) and applications. The notion of providing a virtualized interface to hardware and using software separation to contain different applications and OSes is presenting many new use cases for embedded software developers. One such new use more elegantly combines open-source software with proprietary or commercial applications.

Before examining this interesting use case, it's important to understand how software virtualization works in embedded systems. The term "virtualization" is overused and needs to be broken down to clearly see which virtualization technologies are most relevant to embedded systems developers.

Hardware vs. software virtualization

Hardware and software virtualization are more complementary than competitive. Hardware virtualization is now being implemented by many of the processor vendors and provides a more efficient mechanism for partition/OS switching and hardware resource allocation for a software virtualized environment.

Software virtualization provides an application programming interface for OSes that enables embedded systems designers to take advantage of these virtualized hardware features without having to make any changes to the OS. This has great advantages for the embedded systems market as legacy applications on both legacy and open-source OSes can take advantage of new processor features without new ports or modifications, allowing for an unprecedented migration path for embedded software.

Generally, software virtualization technologies are interchangeably referred to as hypervisors or virtual machine monitors (VMM) and some different technologies are underneath the hood that enable guest OSes to run on top of them. In general, there are two types of hypervisors—Type 1 (Native) and Type 2 (Hosted).

Two types of hypervisors
Type 2: Hosted VMM

Software emulation is a common approach to enabling multiple guest OSes to run on top of a real-time operating system (RTOS). Emulation packages, such as open-source QEMU (available under GNU Lesser General Public License) can run as an application within a process of an RTOS and then emulate the hardware environment that the guest OS is expecting. This type of virtualization is often referred to as a hosted VMM (Type 2).

A hosted VMM has some advantages in that generally the guest OS and applications running on it don't need to be modified. The downside is that this approach can have an impact on the performance of embedded systems because the guest environments are relying on an emulation layer running on top of the underlying OS. Hosted VMMs also have memory-footprint issues because a process-based RTOS plus an emulation layer plus a guest OS plus applications can consume lots of code and data space.

Type 1: Native hypervisor

A possibly more elegant and scalable approach for embedded systems is to use a small underlying separation kernel and native hypervisor (Type 1) to provide the hardware interface. This combination provides a small, efficient embedded-software-virtualization layer for running guest OSes. Although this approach requires a closer tie to the target processor, it can more easily take advantage of the new processor features such as hardware virtualization. This technology can also take advantage of an extra virtualization optimization, called paravirtualization, which isn't typically available in the hosted scenario.

Paravirtualization is a term used for a guest OS that's been modified to run on top of a hypervisor. In this case, the virtualization environment that the embedded applications run on has been optimized for performance, both for the processor environment that it's running on as well as the hypervisor. This approach—when combined with hardware virtualization extensions—offers a near-native execution performance for the embedded applications.

With open-source OSes such as Linux®, this approach is particularly appropriate, as the source to the kernel and board support packages are available, and the performance gains of paravirtulization can make Linux more widely applicable as an embedded OS.

Separation kernels

Another approach that can be used with this technology is full virtualization. This where the same hypervisor can offer a virtualization environment to the guest OS that's similar to running on the native hardware. This requires no changes to the guest OSes, but because the hypervisor is adding more virtualization, there's a small performance hit over the paravirtualized approach.

Figure 2

An interesting approach

Where things really start to get interesting is when these two approaches are combined. In today's embedded systems, there are often components that are real-time and others (such as user or file-access systems) that don't require real time but often need a GUI. These components are often compartmentalized using different hardware and OSes (Linux or Windows® for the GUI, and an RTOS for the real-time portion, for example) to give the best building blocks while keeping the real-time determinism intact.

With a separation kernel and hypervisor, these worlds can be combined on a single hardware platform. The separation kernel communicates both with the underlying hardware platform to partition the appropriate resources and with the hypervisor to ensure that the guest OSes have what they require. The separation kernel and hypervisor determine how to best make use of hardware optimizations and extensions available. This includes hardware virtualization and multicore devices, offering separate secure partitions for each of the guest OSes to run in.

This software separation means that the real-time performance of the RTOS partition isn't compromised by the other, often open-source, guest OSes, and any fault conditions that occur in any of the partitions are confined to that partition. In a multicore system, the separation kernel can also allocate processors to partitions, effectively mimicking the traditional hardware separation using a hardware/software combination and not compromising system performance by sharing processors across different OSes.

The separation kernel can also determine inter-partition communication, using policies to determine which partitions can talk to one another and can also administer the sharing of physical peripheral devices such as displays, network connections and I/O functions between the different partitions, OSes and applications.

Using today's modern multicore and virtualized hardware gives multiple applications and OSes (either paravirtualized or fully virtualized) their own secure partitions to operate in. The relatively small size and efficient operation of this solution means that very little compromise is required for embedded systems developers to adopt this technology today.

A partitioning advantage

This solution also introduces open-source applications and OSes into embedded systems where their use has been traditionally prohibited either due to performance or licensing issues. By allowing the separation kernel and hypervisor to partition different OSes, embedded systems developers now have the opportunity to bring in open-source OSes for the user-interface portion of their system without compromising the hard real-time aspects of their system. The separation kernel can also keep the proprietary applications of the embedded system separate from the open-source parts. And, because no linking of GPL libraries is necessary (because they're loaded into their own partitions), the possible "copyleft" issues of using open-source products are avoided.

This software virtualization environment gives embedded software developers the option of bringing non-real-time applications into a hard real-time system and open-source licensed solutions next to proprietary ones on the same hardware. Such a solution was previously available only by using physical hardware separation.

Introducing open-source OSes and applications into embedded systems has often been difficult due to performance or licensing issues, and hence the benefits of reusing existing open-source and commercial-software intellectual property has been missed. With the introduction of the embedded hypervisor, open-source software is now becoming available to a wider range of embedded systems, spreading the benefits of reuse and cost-effective software development across the spectrum of embedded devices.

Robert Day is Vice President, Marketing at LynuxWorks, Inc. and has more than 20 years of experience in the embedded industry. Based in San José, California, Robert is a graduate of the University of Brighton, England, where he earned a Bachelor of Science degree in computer science.

A LynuxWorks embedded OS is featured in this embedded system application:
 
Who else uses a LynuxWorks embedded operating system?
Security white papers
Building in RTOS Support for Safety- & Security-Critical Systems
LynuxWorks explains the differences between safety-critical and security-critical applications and how to meet their demanding requirements with the LynxOS-178 RTOS and the LynxSecure hypervisor. (EE Times Design, August 2011)
Enhancing Application Performance on Multicore Systems
Tips on optimizing a multicore real-time system, including virtualization, avoiding synchronization and concurrency while maximizing application parallelism. (Military Embedded Systems, February 2011)
Hardware Virtualization puts a new spin on Secure Systems
Real-time determinism and military security don't have to be separate realities. A combination of a secure separation kernel and an embedded hypervisor enables whole new levels of system security. (COTS Journal, October 2010)
Using a Separation Kernel to add Military-Grade Security to Legacy Systems
A challenge for the software designer is how to integrate modern military-grade software programs into legacy software designed long before security standards were predominant in system requirements. (VME Critical Systems, Summer 2010)
Virtualization: Keeping Embedded Software safe and Secure in an Unsafe World
A new, secure methodology is needed to separate systems of different security levels which run on shared resources—without compromising the performance of legacy systems. (EE Times, June 2010)
Secure Virtualization Combines Traditional Desktop OSs and Embedded RTOSes in Military Embedded Systems
Advances in software and hardware technologies now make it feasible to use both embedded and desktop operating systems in a secure military system. (Military Embedded Systems, May 2010)
DO-178B Provides Certification Safety net
Developers of commercial avionics software must demonstrate compliance with DO-178 guidelines. The FAA has issued additional guidance for so-called DO-178B Reusable Software Components (RSCs as defined in AC20-148), which allow for reuse of certifications. (COTS Journal, November 2009)
Designing Safety-critical Avionics Software Using open Standards
Safety-critical avionics systems have continually grown more complex and software-intensive. Regulatory authorities and avionics manufacturers have responded with guidance such as DO-178B and RSC to ensure that software performs safely, with controlled development cost. (Boards and Solutions, September 2009)
Two Different Realms: RTOS Support for Safety-critical vs. Security-critical Systems
Safety- and security-critical system functions are evolving simultaneously, with different yet similar requirements. Modern RTOSes are stepping up to meet these needs. (VME and Critical Systems, June 2009)
Virtualization Makes Better use of Open-source OSes and apps
With the introduction of the embedded hypervisor, embedded systems can avoid certain performance or licensing issues inherent to open-source OSes and applications. (EE Times, March 23, 2009)
Secure Virtualization Technology can Extend the life of Legacy Systems
By combining the concept of virtualization and security, one can consolidate multiple legacy systems running on heterogeneous operating systems onto a single host system with high-assurance security. (Military Embedded Systems, January/February 2009)
Virtual Machines: Intel's CPU Extensions Transform Virtualization
Virtualization has traditionally presented its share of design challenges in information-assurance-based systems. But now, Intel's VT-x and VT-d CPU extensions are changing the game and showing potential to become the de facto path to virtualization. (Military Embedded Systems, January 2009)
Separation Kernel for a Secure Real-time Operating System
The technical foundation adopted for the so-called MILS architecture is a separation kernel like LynxSecure, which permits multiple functions to be realised on a common set of physical resources without unwanted mutual interference. (Boards and Solutions Magazine, February 2008)
Advances in Virtualization aid Information Assurance
Advances in the newest Intel® processors are making virtualization much easier to implement in security applications than ever before. (Embedded Computing Design, January 2008)
Protecting our most Vital Systems
Some significant defence programmes are already committed to a new approach to high-threat, high-asset-value systems. Rance DeLong explains MILS. (Components in Electronics, April 2007)
Perspectives: Security and the Separation Kernel
Today's avionics systems are designed to support more than one application, using a partitioned operating system and memory management units to ensure applications have adequate separation. (Avionics Magazine, April 2007)
MILS: An Architecture for Security, Safety, and Real Time
The unrelenting growth and integration of embedded controls, information processing, and communications has created a need for systems that provide robust protection for resources and services in the face of serious threats. (Embedded Technology Magazine, November 2006)
Partitioning Operating Systems Versus Process-based Operating Systems
Partitioning operating systems are the latest buzz, while processes, by contrast, have been around for over 30 years. Both provide memory protection, however, the intent behind them is very different.
DO-178B and the Common Criteria: Future Security Levels
Although there are similarities between the airborne safety-critical requirements in RTCA/DO-178B and the Common Criteria, ISO 14508, compliance with the higher levels of security in the Common Criteria demands meeting additional security requirements. (COTS Journal, April 2006)
Reusing Safety-Critical Software Components
Safety-critical systems often operate together as a single "system-of-systems," making it important that they meet the most stringent and rigorous requirements for safety-criticality. The failure of one module in a system could create other failures or vulnerabilities, or worse yet, failure of the system as a whole. (COTS Journal, August 2005)
Using the Microprocessor MMU for Software Protection in Real-Time Systems
With minimal impact to overall system performance, user tasks and the kernel can be protected from accidental corruption by using multiple protected address spaces.
Improving code Migration and Reuse
The unrelenting growth and integration of embedded controls, information processing, and communications has created a need for systems that provide robust protection for resources and services in the face of serious threats. (Embedded Computing Design, August 2006)
FCS Program Rolls Forward in Formation
A wireless data network, with advanced communications and technologies, links soldiers with 18 new, lightweight manned and unmanned ground vehicles, unmanned aircraft, sensors and weapons—and it's all in one program. (COTS Journal, June 2005)
Secure Operating Systems for Deeply Embedded Devices
As we add more intelligence to our embedded devices, we find that they are becoming increasingly integrated into our information technology infrastructure. Though system security is not a new concept, security-in-depth is a new paradigm developers are now starting to address. (RTC Magazine, September 2004)
LynxSecure Separation Kernel and Embedded Hypervisor LynxOS-SE Embedded RTOS Luminosity Eclipse-based IDE
LynxOS Embedded RTOS RTOS: LynxOS-178 for software certification

 

SpyKer Embedded-System Trace Tool

Industry Solutions

Migration

Industry Standards

Embedded Systems Technology

RTOS Training for Embedded Systems

Training at LynuxWorks

LynuxWorks Support

Embedded Systems

LynxOS RTOS Support

Embedded System Consulting

Contact Us

About LynuxWorks

Press Room

Newsletter and Announcements

Careers

Site Map

Board Support Packages (BSPs)

BSP Device Drivers

BSP Targets by Operating System

BSP Targets by Form Factor

Third-party I/O Devices and Hardware

SynergyWorks: LynuxWorks partners


What is SynergyWorks?

Third-party add-ons for LynuxWorks operating systems

Copyright © LynuxWorks™, Inc. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of LynuxWorks is prohibited.