Is virtualization right for your application?Any electrical or computer engineer that reads industry publications today has likely seen the word "virtualization" enough times to know that it's a hot topic. In fact, a quick search of embedded.com yields over 200 results for the buzz word. How real is this trend? Does virtualization provide real savings? This article will attempt to answer these questions by outlining the major engineering use cases for virtualization, discussing how it impacts performance, and addressing a topic that is critical in engineering designs: hardware I/O. The goal is to allow you to make a straightforward assessment of virtualization technology for your application--independent of the hype.
Note that on December 8-10, National Instruments and Intel will present a webinar series on Embedded Virtualization.
To fully understand the performance implications of using virtualization in your own designs, it helps to know the basic principles that make virtualization hardware and software. The basic goal of virtualization is to run multiple operating systems in parallel on one computer such that no individual operating system affects the others in any way. In simple terms, any individual operating system (called a virtual machine) cannot be allowed to affect shared system resources except in very special circumstances. For example, envision several operating systems inadvertently accessing the same memory location at the same time. This situation would be a nightmare to debug, as any operating system could overwrite the stored value at any time.
The key component required to make virtualization work is a piece of software called a virtual machine monitor (VMM), also known as a hypervisor. See Figure 1 for a conceptual representation of how this software fits into a virtualized system. The VMM's mission is straightforward: prevent individual operating systems (virtual machines or VMs) from altering shared system state, therefore making sure that conflicts do not occur. In more exact terms, a VMM cannot allow individual VMs to independently execute "privileged instructions" such as accessing memory or I/O devices that could potentially conflict with other VMs accessing the same resource.
Note that there are two basic categories of VMM software: hosted and bare-metal. Because hosted VMM solutions (such as VMWare Workstation) rely on a host operating system for scheduling and I/O access, they are generally not a good fit for deployed engineering applications. Therefore, we will focus on bare-metal VMM software for the remainder of this piece.