Wednesday, March 26, 2008

Virtual Machine

Virtual Machines
A virtual machine (VM) is a software implementation of a machine that executes programs like a real machine. It is a program running on a computer that creates a self-contained operating environment and presents the appearance to the user of a different computer.

At the simplest level, computing environments are thought to consist of hardware, an operating system that runs on the hardware and applications that urn on the OS – thought in embedded systems, the operating system is sometimes eliminated and applications run directly on the hardware. The OS is aware of all the capacity and capability of the underlying hardware and controls it directly.

If another layer of software were placed between the OS and the CPU, then the OS would know only what that extra layer of software told it. Its understanding of the capacity and capability of the underlying hardware would depend on the intervening software layer, and it would be able to control the underlying hardware only in ways the intervening layer of software allowed it to.

The intervening layer of software could tell the OS everything there was to know about the hardware and simply pass through control directives without translation. But it also might not reveal everything about the underlying hardware and might add some control of its own as it passes on the control directives to the OS. In either case, the configuration would not be the standard tripartite configuration. It would be one of the many possible configurations that is called a virtual machine.

Of course, there are servers, networks and Web interfaces, as well as other devices and interfaces that add nuance and complexity to computing environments. But using a software layer to package a set of computing resources and behaviors and to present it as an available computing environment is at the core of what is means to create a virtual machine.

A virtual machine is a computing environment whose set of resources and behaviors is built through software on top of some other computing environment.

Hypervisor VMs
Virtual machines are at the core of server technologies like VMware Inc.’s ESX Server and the open-source Xen virtual machine monitor. Both of these products offer servers that run multiple x86-based OSs simultaneously. Their approaches are slightly different variations of what are called hardware-level, bare-metal or hypervisor virtual machines. The intermediary software layer called the virtual machine monitor or hypervisor is between the OS and the hardware. The hypervisor gives all the OSs that are running the illusion that they are the only OS running on the hardware.

Running multiple OSs on one server platform offers several advantages. It makes it possible to more fully use the resources of very powerful servers, provide backward compatibility for legacy programs and partition applications to different OSs so they can’t corrupt one another.

VMware uses transparent virtualization, which means that the OSs that urn on the hypervisor do not need to be modified. Xen uses paravirtualization, which means that it needs to modify the OSs to make them run simultaneously on the hardware. Xen claims that paravirtualization increases speed and efficiency.

Hosted VMs
Microsoft Corp’s Virtual PC and VMware’s GSX Server and Workstation are called hosted virtual machines. In these products, the VM is like any other application running on an OS. The VM application is divided into an intermediary software layer, and OS and an application running on that OS.

This scheme is less efficient and less powerful than that used for hypervisor servers, but it provides the same kind of advantages, allowing a user to run legacy programs and to partition applications from the rest of the system. A user who wants to visit dangerous Web sites, for example, could add a layer of protection by doing his surfing via a virtual machine.

Application-level VMs
Application-level VMs, such as the Java virtual machine, are similar to the hosted model in that they run as applications. These VMs, however, combine the intermediary software layer with the OS. The Java VM runs like an application on the native OS, and the Java application runs on the VM.

One of the advantages claimed form this programming paradigm is that a Java program will run on any Java VM without recompilation. That is left to the provider of the Java VM, which must make it run on a variety of native OSs.

Parallel Virtual Machine
The parallel VM is a slightly different approach to creating a virtual machine. In this case, the intermediary software layer exists as a daemon, or a server program, along with a set of library calls, which must be compiled into the application that is going to be run on the parallel VM. The library calls, which interact with the server programs, make a network of computers appear to be a single computer with parallel processors.

No comments: