Some technologies, it seems to me, should not really exist. They do, however, because they address a specific need. Typically, such technologies stretch something to make it perform in a way that was not originally intended. An example would be the fax machine. In a paper-based office environment, there was a frequent need to move documents from A to B. Initially, this resulted in the mail. But fax was an ingenious way to use phone lines to deliver a similar result. As soon as email became widespread, fax disappeared almost overnight.
The technology that I have in mind today is hypervisors, which are a software layer that enables multiple operating systems to be run simultaneously on a single hardware platform. They have been used for decades on mainframes, more recently on desktop computers, but are now beginning to be very relevant to embedded developers …
The first question to ask, when looking at the capabilities of any technology, is: why? What is the benefit of running multiple OSes on one piece of hardware, bearing in mind that this introduces significant complexity? The most important answer is security. A hypervisor provides a very strong layer of insulation and protection between the guest operating systems, ensuring that there is no possibility of one multi-threaded application interfering with another. A secondary, but still very significant, motivation to run multiple OSes is IP reuse. Imagine that there is some important software IP available for Linux that you want to use in your design. However, your device is real time, so an RTOS makes better sense. If multicore is not an option [as that is another way to run multiple OSes on one device], using a hypervisor is the way forward, so that you can run Linux and your RTOS.
Hypervisors broadly come in two flavors, which are imaginatively named Type 1 and Type 2. Type 1 hypervisors run on bare metal; Type 2 require an underlying host operating system. For embedded applications, Type 1 makes most sense for the majority of applications. I attended a conference session recently, where the speaker referred to Type 0, 1 and 2. Type 0 seemed to equate to what I would call Type 1 and I could not figure out the difference between his Type 1 and Type 2. Clearly, care is needed with the interpretation of terminology in this space.
I said that a hypervisor enables multiple OSes on a single hardware platform, implying that this meant single processor. In fact, many products support the use of multiple CPUs, with the hypervisor distributing execution time. This is a complex matter, which I may return to another day.
Mentor Graphics recently announced Mentor Embedded Hypervisor, which is designed specifically for embedded applications. Full details of the product may be found here. If you would like to learn more this product and hypervisors in general, you may wish to attend an online seminar which takes place tomorrow. A recording will be available after the live event.
Posted November 11th, 2013, by Colin Walls
- malloc() – just say no
- What size drink would you like?
- Using an embedded Web server
- Row 13 – unlucky for some?
- Brillo – a brilliant OS or a scouring pad?
- How Mac and I are getting along – an interim report
- IPv6 – some guidance to the uninitiated
- Power outlets when traveling – and USB again
- Spotting the difference – subtleties of C code
- Shutting the Windows – moving to a Mac?