1
1
Calum Aldridge
2 Overview
Objective of virtual machines is to abstract the hardware of a single computer into
multiple execution environments.
Illusion that each environment is running on its own individual computer.
3 Overview: Components
Host: The underlying hardware system that runs the virtual machines.
Virtual Machine Manager (hypervisor): Creates and runs virtual machines by
providing an interface identical to the host.
Guest: Software component of a virtual machine i.e. usually an independent instance
of an operating system.
4 Overview: Implementations
Type 0 hypervisors: hardware-based solutions that provide support for virtual
machine creation and management via firmware. Ex: IBM LPARs
Type 1 hypervisors: operating-system-like software built to provide virtualization.
Ex: VMware ESX
Type 2 hypervisors: Applications that run on standard OSes but provide VMM features
to guest OSes. Ex: Parallels, VirtualBox
Emulators: allows applications written for one hardware environment to run on a
very different hardware environment. Ex: CEMU
5 History
Virtual machines first appeared commercially on IBM mainframes in 1972.
Provided by the IBM VM operating system.
One problem with the early VMs involved disk systems. How would one solve many
virtual machines using few disk drives?
Minidisks: Virtual disks where the system allocated as many tracks on the physical
disks as the minidisk needed.
6 History cont.
IBM remained the master of virtualization for many years after its introduction.
A formal definition for virtualization helped establish system requirements and a
target for functionality.
A VMM provides an environment for programs that is essentially identical to the
original machine.
Programs running within that environment show only minor performance decreases..
The VMM is in complete control of system resources.
18 Hardware Assistance
Without some level of hardware support, virtualization would be impossible.
Intel added new virtualization support in successive generations of the x86 family
and now binary translation is no longer needed.
AMD and Intel have addressed memory management which allows VMMs to not have to
implement software NPTs.
A standard direct-memory-access (DMA) controller accepts a target memory address
and a source I/O device and transfers data between the two without OS action.
Without this hardware assistance, a guest might try to set up a DMA transfer that
affects the VMM or other guests.
25 Paravirtualization
Paravirtualization presents the guest with a system that is similar but not
identical to the guest’s preferred system.
The guest must be modified to run on the paravirtualized virtual hardware.
This extra work leads to more efficient use of resources and a smaller
virtualization layer.
The Xen VMM implements several techniques to optimize performance of guests as well
as hosts.
Presents clean and simple device abstractions allowing efficient I/O.
Does not implement NPTs. Each guest has its own page tables set to read-only.
A hypercall is made from the guest to the hypervisor VMM when a change is needed.
26 Programming-Environment Virtualization
A programming language is designed to run within a custom-built virtualized
environment.
Java’s virtual machine (JVM) is a particularly notable example with specific
methods for security and memory management.
For Java, programs run within the JVM environment meaning that any system can run a
Java program assuming the presence of a JVM.