Hypervisors And Separation Kernels

Dec. 11, 2008
The key reason for using an RTOS is determinism, which typically means precise management or time and space resources. Unfortunately, many problems require more complex solutions, including virtual memory and virtual-machine support. Virtual-m

The key reason for using an RTOS is determinism, which typically means precise management or time and space resources. Unfortunately, many problems require more complex solutions, including virtual memory and virtual-machine support.

Virtual-memory systems drive RTOS programmers nuts, because a single page fault can mess up timing. In most instances, the trick is to lock down applications that require real-time support. This sometimes means not using the caches associated with a virtualmemory system.

More often, though, the chips can lock down portions of the cache for use by the kernel or device drivers. As a result, other portions of the application can take advantage of virtual-memory support. These applications could still be real time, but their cycle times must be longer to account for the possibility of page faults.

Virtual memory provides memory-access protection in addition to virtualization support. Often, just the protection support is required. In this case, platforms that only provide memory-access protection can be used. The RTOS operation in this case isn’t much different than a virtual-memory operating system.

Virtual-machine support is more sophisticated than virtual-memory support. At this point, all virtual-machine platforms implement virtual memory. This can be a challenge for programmers needing determinism, but RTOS support is possible.

A small hypervisor sits between the real hardware and the rest of the system (see the figure). The hypervisor normally runs virtual machines that are isolated. The virtual machines can run a single application or another operating system. Sometimes a host operating system will run directly atop the hypervisor.

Running an RTOS on the hypervisor is one way to provide real-time support. A more challenging approach is to run an RTOS inside a virtual machine. This is possible, and several vendors deliver this type of virtual-machine support. The hard part is determining the timing associated with the RTOS and its applications. Hardware support can minimize the overhead associated with virtual machine support. Locking down cache contents is an option, too, allowing virtualized applications to perform close to what would occur with bare, non-virtualized hardware

About the Author

William G. Wong | Senior Content Director - Electronic Design and Microwaves & RF

I am Editor of Electronic Design focusing on embedded, software, and systems. As Senior Content Director, I also manage Microwaves & RF and I work with a great team of editors to provide engineers, programmers, developers and technical managers with interesting and useful articles and videos on a regular basis. Check out our free newsletters to see the latest content.

You can send press releases for new products for possible coverage on the website. I am also interested in receiving contributed articles for publishing on our website. Use our template and send to me along with a signed release form. 

Check out my blog, AltEmbedded on Electronic Design, as well as his latest articles on this site that are listed below. 

You can visit my social media via these links:

I earned a Bachelor of Electrical Engineering at the Georgia Institute of Technology and a Masters in Computer Science from Rutgers University. I still do a bit of programming using everything from C and C++ to Rust and Ada/SPARK. I do a bit of PHP programming for Drupal websites. I have posted a few Drupal modules.  

I still get a hand on software and electronic hardware. Some of this can be found on our Kit Close-Up video series. You can also see me on many of our TechXchange Talk videos. I am interested in a range of projects from robotics to artificial intelligence. 

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!