Server Virtualization: Beyond Hypervisors.
When I first heard about Server Virtualization, my first thought was, “Why did nobody think about this earlier”. Of course, I later learnt that the idea had been around for more than 4 decades. But then, why did it go into hibernation?
IBM introduced the concept of virtualization at a time when computers didn’t mean anything other than mainframes. It was much later that x86 and the PC revolutionized the world. So while the computer became smaller, cheaper, faster and more accessible, the very need for Virtualization disappeared. After all, why have Virtual machines when you can have ‘real’ ones?
But the exponential growth in computing capabilities (hardware processing power) has today resulted in heavily underutilized machines. Couple this with the concerns over rising carbon emissions (power consumption and cooling needs) and the increasing complexity in managing numerous servers in the data center; …and the stage was set for Virtualized machines to make a comeback.
There was but one small problem.
The x86 architecture which is predominant today, was not designed with virtualization in mind. Certain sensitive instructions expected the Operating System to be directly interacting with the hardware, making it difficult to realize ‘true’ Virtualization (as defined by the Popek and Goldberg criteria).
VMware was the first to find a way around this obstacle, by way of a method called the Binary Translation in which the privileged instructions were trapped by a software interpreter layer known as the Virtual Machine Monitor (VMM), and converted to ‘safe’ instructions that could be virtualized.
In the two approaches to Server Virtualization that I tried to describe in my previous post, the guest OS required no changes and was quite unaware if it was sharing the hardware resources with other co-located virtual machines. The VMMs in this case provides the guest OS with a complete emulation of the underlying hardware. For this reason, this kind of virtualization is also referred to as ‘Full Virtualization’.
While the VMMs appears to solve the entire problem with regard to virtualized machines, it does bring in some level of performance degradation, caused by the extra processing (in terms of the ‘instruction translation’) that the hypervisor has to do. This can be addressed if the original problems with the x86 architecture could be resolved…either in [1] OS (software) or in [2] hardware.
1) Paravirtualization:
The first ‘solution’ (in software) is what Paravirtualization tries to achieve.
In Paravirtualization, the Guest OS kernel is modified by replacing the non-virtualizable instructions with safe API ‘hooks’ into the hypervisor. In simple terms, this does away with the hypervisors botheration about translating these instructions; thus improving performance and efficiency.
The Xen Hypervisor open source project is one of the earliest proponents of Paravirtualization.
Paravirtualization is not ‘Full virtualization’ since it involves modifications to the Guest OS. So while it does bring about a significant improvement in terms of virtualization overhead, it has its limitations when it comes to compatibility and portability. For instance unmodified commercial Operating systems (like Windows Server 2003) cannot be supported by Paravirtualization techniques.
Since it involves modifications to the OS, Paravirtualization is also sometimes referred to as OS-assisted Virtualization.
2) Hardware- Assisted Virtualization:
Intel and AMD have been working on trying to address the virtualization limitations of the x86 architecture; and have come up with the Intel-VT and AMD-V respectively; extensions that provide virtualization support on some of their processors. As opposed to Paravirtualization (OS-assisted) or Binary Translation (Hypervisor-assisted), in Hardware-assisted virtualization the privileged instructions are now trapped and emulated in the hardware directly.
The advantage to this technique is that, OS kernels no longer need to be tweaked (as in Paravirtualization) and can run as-is. At the same time, the hypervisor also does not need to be involved in the inefficient Binary Translation of the sensitive instructions. Thus not only does Hardware-assisted Virtualization satisfy the Popek and Goldberg criteria (of Full Virtualization) it also provides improved performance.
However, Hardware-Assisted Virtualization is still in its early days and not all of its promises have yet been realized to an extent to render Binary Translation or Paravirtualization techniques obsolete.




