Electronic Design

EiED Online>> Virtual Embedding

Read a good book lately? I picked up one recently entitled Virtual Machines: Versatile Platforms for Systems and Processes by James E. Smith and Ravi Nair. It covers a wide range of topics ranging from hardware virtualization (like that started by IBM with VM/370) to Java virtual machine (JVM). First, a quick review of the book before diving into the embedded aspects of virtualization.

If you have any interest in virtualization, system partitioning, or virtual machines, this book is a must have. It is broad and detailed. It would easily be the mainstay for a two semester course. Not surprising coming from a pair of renowned researchers and academics.

Given the level of sophistication, the book is still surprisingly easy to read and will be of interest even to those new to virtualization techniques and usage. The opening introduces virtual machines and then transitions into implementations of binary translation. Case studies pop up throughout the book and they provide insight into the successes and problems that arise with virtualization.

Virtual Machines addresses all the basics like Pascal P-code, multiprocessor virtualization with IBM's VM/370 and AS/400 architectures, the novel but now defunct Transmeta Crusoe, and even Intel's new VT-x (Vanderpool) technology that will make full virtualization easier on the next crop of x86 processors. Most are covered in extensive case studies providing insights into each approach. It even covers virtual machine managers (VMM) like those from VMware, Microsoft, and the open source Xen VMM (see Virtual Development, ED Online 9868).

Smith and Nair have done an excellent job with Virtual Machines. It will take awhile to digest the contents of this book, but it is well worth time.

When I last looked at Xen and VMware it was from a development-tool perspective. This time I want to take a look at it from an embedded perspective. Companies like Jaluna with OSware and Green Hills Software with its Padded Cell technology in the Integrity RTOS allow multiple operating systems to reside on a single processor. Developers can then mix legacy or real-time applications with applications that run on Linux or other high-level operating systems.

The Xen of Para-Virtualization
Full virtualization allows a virtual machine manager (VMM) to run unmodified guest operating systems. Unfortunately, it requires hardware not always found on embedded systems and overhead tends to be higher than another technique called para-virtualization.

Para-virtualization (see figure) runs guest operating systems as well, but each must be modified to accommodate the VMM or hypervisor. User Mode Linux (UML) takes a similar approach but the target is Linux, not a hypervisor system like the open source Xen.

Xen has its own API that includes device channels for device drivers and hardware access. Simon Crosby, VP Strategy and Corporate Development of Xen Source, noted that many people would prefer that this type of interface was the one that all operating systems would employ. It would make operating system porting very easy. In fact, archxen is now a standard target for Linux.

This approach is better for a variety of reasons. First, hardware support is not a requirement to support multiple guest operating systems. Hardware support and memory protection is still useful, but for different reasons. Second, overhead is significantly reduced because accessing hypervisor services is akin to an application accessing operating system services, a well accepted technique. Finally, guest operating systems can be quickly moved from one platform to another because the target is not a virtual machine environment. Hardware-specific details are reduced if not eliminated.

Likewise, device drivers tend to turn into stubs. Most para-virtualization systems like Xen can allow native device drivers in a guest operating system, but this makes it more difficult to share devices. It also makes the device support specific to a particular guest. Instead, Xen prefers to have its device drivers reside in a partition that is independent of the guest operating systems even if a device is used by only one guest. This has additional benefits, such as allowing the hypervisor manager to configure devices for any guest as well as providing improved protection and security. It also relieves guest operating systems from having to match support for specific hardware.

Xen 3.0 is in the works, but you can get earlier versions from their website or in various Linux distributions like Novell's SuSE. One thing Xen is currently short on is management tools. While companies like Xen Source are working to change that, for now Xen takes a bit of work to support. Companies like VMware provide support designed for desktop and server solutions, but you will need to turn to companies like Jaluna for embedded solutions. Xen, which is suitable for embedded applications, is the cutting-edge and you may need to do a good bit of customization to handle your target environment.

On the plus side, the source for Xen is open and available. That is also one reason that Xen supports primarily open source guest operating systems at this time, because the guests must be modified. This means that at least one type of guest for an embedded solution can easily be Linux or BSD. It would then be a matter of adding support to an embedded RTOS to create a system that includes real-time support.

Of course, virtualization is just one way to get two or more operating systems to coexist on the same hardware.

It's Slick
I've had a copy of Slick Edit V10 sitting here for awhile. I used Slick Edit many years ago when software development did not include IDEs like Eclipse and Microsoft Visual Studio. At that time, Slick Edit was indispensable. It made fast work of editing. It was amazingly customizable and was the ideal mix between a command line development environment and windowed development environment.

I am happy to say that Slick Edit is as fast and flexible as it was in the past. Its macros are easy to use but extremely powerful. A separate manual is dedicated to the Slick-C macro programming language. I found this very handy to automate editing tasks as well as development and testing tasks. Using Slick-C is second nature for C programmers.

Slick Edit has a chameleon-like interface that can readily emulate keyboard interfaces for tools like vi, GNU emacs, CodeWarrior, Brief, and Microsoft Visual Studio.

Versatility is what Slick Edit embodies. It can includes a Java GUI Builder that supports Swing and AWT. It also has editors for XML and HTML. This allows Slick Edit developers to tackle complex server-based web applications.

There is also an Eclipse plug-in for Slick Edit. This provides the editing flexibility of Slick Edit in the popular IDE. Of course, if you want to stick with the standard Slick Edit, you can run it on a wide range of operating systems from Windows and Linux to Solaris and the Mac OS.

Happy developing.

Related Links
Advanced Micro Devices
www.amd.com

BSD
www.bsd.org

Eclipse
www.eclipse.org

Green Hills Software
www.ghs.com

IBM
www.ibm.com

Intel
www.intel.com

Jaluna
www.jaluna.com

Microsoft
www.microsoft.com

Novell
www.novell.com

Slick Edit
www.slickedit.com

User Mode Linux
http://usermodelinux.org

Virtual Machines: Versatile Platforms for Systems and Processes
ISBN 1-55860-910-5
Electronic Design Bookstore

VMware
www.vmware.com

Xen
www.cl.cam.ac.uk/Research/SRG/netos/xen/

Xen Source
www.xensource.com

TAGS: Intel
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish