Hypervisor
From Wikipedia, the free encyclopedia
In computing, a hypervisor (also: virtual machine monitor) is a virtualization platform that allows multiple operating systems to run on a host computer at the same time. The term usually refers to an implementation using full virtualization. Hypervisors are currently classified in two types: [1]
- Type 1 hypervisor (or Type 1 virtual machine monitor) is software that runs directly on a given hardware platform (as an operating system control program). A "guest" operating system thus runs at the second level above the hardware. The classic type 1 hypervisor was CP/CMS, developed at IBM in the 1960s, ancestor of IBM's current z/VM. More recent examples are Xen, VMware's ESX Server, and Sun's Logical Domains Hypervisor (released in 2005).
- Type 2 hypervisor (or Type 2 virtual machine monitor) is software that runs within an operating system environment. A "guest" operating system thus runs at the third level above the hardware. Examples include VMware server and Microsoft Virtual Server.
The term hypervisor apparently originated in IBM's CP-370 reimplementation of CP-67 for the System/370, released in 1972 as VM/370. The term hypervisor call referred to the paravirtualization interface, by which a "guest" operating system could access services directly from the (higher-level) control program – analogous to making a "supervisor call" to the (same level) operating system. (The term 'supervisor' refers to the operating system kernel, which on IBM mainframes runs in supervisor state.)
Contents |
[edit] Mainframe origins
The first hypervisor providing full virtualization was IBM's CP-40, a one-off research system that began production use in January 1967, and which became the first version of IBM's CP/CMS operating system. CP-40 ran on a one-off S/360-40 that was customized to support virtualization. Prior to this time, computer hardware had only been virtualized enough to allow multiple user applications to be run (see CTSS and IBM M44/44X). With CP-40, the hardware's supervisor state was virtualized as well, allowing multiple operating systems to run simultaneously.
CP-40 was soon re-implemented (as CP-67) for the IBM System/360-67, the first production computer system capable of full virtualization. This machine was first shipped in 1966, and included page translation table hardware for virtual memory, and other techniques that allowed a full virtualization of all kernel tasks, including I/O and interrupt handling. (Note that its "official" operating system, the ill-fated TSS/360, did not employ full virtualization.) Both CP-40 and CP-67 began production use in 1967. CP/CMS was available to IBM customers from 1968 to 1972, in source code form without support.
CP/CMS was part of IBM's attempt to build robust time-sharing systems for its mainframe computers. By running multiple operating systems simultaneously, the hypervisor increased system robustness and stability: Even if one operating system crashed, the others would continue working without interruption. Indeed, this even allowed beta or experimental versions of operating systems – or even of new hardware[2] – to be deployed and debugged, without jeopardizing the stable main production system, and without requiring costly additional development systems.
IBM's System/370 series was announced in 1970 without any virtualization features, but these were added to the series in 1972, and have appeared in all successor systems. (All modern-day IBM mainframes, such as the zSeries line, continue to be backwards-compatible with the four-decade old IBM S/360 line.) The 1972 announcement also included VM/370, a reimplementation of CP/CMS for the S/370. Unlike CP/CMS, IBM provided support for this version (though it was still distributed in source code form for several releases). VM stands for Virtual Machine, emphasizing that all, and not just some, of the hardware interfaces are virtualized. Both VM and CP/CMS enjoyed early acceptance and rapid development by universities, corporate users, and time-sharing vendors, as well as within IBM. Users played an active role in ongoing development, anticipating trends seen in modern open source projects. However, in a series of disputed and bitter battles, time-sharing lost out to batch processing through IBM political infighting, and VM remained IBM's "other" operating system for decades. It has enjoyed a resurgence of popularity and support in recent years as the current z/VM product, e.g. as the platform for Linux for zSeries.
As mentioned above, the VM control program includes a hypervisor call handler which intercepts DIAG ("Diagnose") instructions used within a virtual machine. This provides fast-path non-virtualized execution of file system access and other operations. (DIAG is a model-dependent privileged instruction, not used in normal programming, and thus is not virtualized. It is therefore available for use as a signal to the "host" operating system.) When first implemented in CP/CMS release 3.1, this use of DIAG provided an operating system interface that was analogous to the System/360 SVC ("supervisor call") instruction, but that did not require altering or extending the system's virtualization of SVC.
[edit] UNIX and Linux servers
Several factors led to a resurgence in the use of virtualization technology among UNIX and Linux server vendors:
- Expanding hardware capabilities, allowing more simultaneous work to be done per machine
- Efforts to control costs and simplify management through consolidation of servers
- The need to control large multiprocessor and cluster installations, e.g. in server farms and render farms
- The improved security, reliability, and device independence possible from hypervisor architectures
- The desire to run complex, OS-dependent applications in different hardware or OS environments
The major UNIX vendors, including Sun Microsystems, HP, IBM, and SGI, have been selling virtualized hardware since before 2000. These have generally been large systems with hefty, server-class price tags (in the multi-million dollar range at the high end), although virtualization is also available on some mid-range systems, such as IBM's System-P servers and Sun's T1000 and T2000 servers.
Multiple host operating systems have been modified to run as guest OSs on Sun's Hypervisor. As of late 2006, Solaris, Linux (Ubuntu and Gentoo), and FreeBSD have been ported to run on top of Hypervisor (and can all run simultaneously on the same processor, as fully-virtualized independent guest OSs). Wind River "Carrier Grade Linux" also plans to run on Sun's Hypervisor. Full virtualization on SPARC processors was not difficult because the SPARC architecture, since its inception in the mid-1980's, was deliberately kept clean of artifacts that would have impeded virtualization. (Compare with virtualization on x86 processors, described in the next section.)
Similar trends have been seen with Linux x86/x64 server platforms, where virtualization efforts have been led by open source projects such as Xen. Since these technologies span from large systems down to desktops, they are described in the next section.
[edit] PCs and desktop systems
Interest in the high-profit server hardware market sector has led to the development of hypervisors for the Intel x86 instruction-set machines, including traditional desktop PCs. One of the early PC hypervisors was the commercial VMware, introduced in the mid-1990s.
The x86 architecture used in most PC systems is particularly difficult to virtualize. Full virtualization (presenting the illusion of a complete set of standard hardware) on x86 has significant costs in hypervisor complexity and runtime performance.
An alternative approach requires that the guest operating system be modified to make system calls to the hypervisor, rather than executing machine I/O instructions which are then simulated by the hypervisor. This is called paravirtualization in Xen, a "hypercall" in Parallels Workstation, and a "DIAGNOSE code" in IBM's VM. VMware supplements the slowest rough corners of virtualization with device drivers for the host. All are really the same thing, a system call to the hypervisor below. Some microkernels such as Mach and L4 are flexible enough such that "paravirtualization" of guest operating systems is possible.
CPU vendors have added hardware virtualization assistance to their products. Intel's is called VT (codenamed Vanderpool), AMD's is referred to as AMD Virtualization or AMD-V (codename: Pacifica). These extensions address the parts of x86 that are difficult or inefficient to virtualize, providing additional support to the hypervisor. This enables simpler virtualization code and a higher performance for full virtualization.
Others, like Xen or TRANGO, are implemented as software-only virtual machines. Xen is running on a normal host operating system such as Linux, and is able to run both paravirtualized and, with the help of the hardware virtualization extensions Intel VTx, fully virtualized (i.e. an unmodified operating system) as guest operating systems. In fact, Xen has successfully demonstrated Windows XP running unmodified. The Xen distribution already contains versions of FreeBSD, Linux, NetBSD, and Plan 9 from Bell Labs that have been so modified. TRANGO is more focused on embedded operating systems and CPU architectures (ARM, MIPS, PowerPC) and supports both embedded open operating systems like Linux, and real-time operating systems such as eCos or µC/OS-II. User programs will continue to work on Xen and TRANGO without change.
[edit] References
- ^ IBM Systems Virtualization, IBM Corporation, Version 2 Release 1 (2005), available on-line at publib.boulder.ibm.com – description of basic concepts
- ^ See History of CP/CMS for virtual hardware simulation in the development of the System/370
External links