Professional Documents
Culture Documents
Bibliography
1.
2.
3.
4.
5.
6.
7.
Outline
Overview
What is a virtual machine?
What is a virtual machine monitor (VMM)?
System or application (process) virtual machines
VM1
VM2
VM3
Application
Application
Application
Guest OS1
Guest OS2
Guest OS3
Traditional VMM
Hybrid
VM1
VM2
App
I/O
App App
VMM
Host OS
VMM
Operating system
Guest OS
Hardware layer
VMM
Hardware Layer
Hosted
Separation of powers:
Virtual machine interacts with user
applications
Virtual machine monitor manages hardware
resources
VMware
VMware, a publicly held company, founded by
Stanford developers
Two lines of products:
Desktop : a range of products; advertised as a way
for corporations to migrate and upgrade operating
systems from a centralized IT center
VMware ESXi Server is the most recent product in
this line; is a bare-metal hypervisor
Xen
Xen: open-source VM system for x86, Itanium,
ARM & others
Originated at Cambridge University Computer Lab
Now supported as an open-source product that
has destktop, server, and cloud capabilities
(Amazon uses it for its cloud services.)
Designed to support execution of Linux, other
Unix-like systems (Solaris, BSD), Windows
simultaneously on the same platform
Objective of original project: efficient hosting of up
to 100 virtual machines
Denali
Research project U of Washington
Time frame ~ 2001-2004.
OS Flexibility
Encapsulation
Conventionally, servers ran on dedicated machines.
Protects against another server/application crashing the OS
But wasteful of hardware resources
Desirable Qualities
A good VMM
Doesnt require applications to be modified
Doesnt severely affect performance
Is not complex/error prone
Implementation Issues
Virtualize CPU
Guest OS runs as if it is executing directly on
the hardware CPU, but it isnt
Virtualize memory
Guest OS thinks it is managing memory
directly, but it isnt
CPU Virtualization
Basic technique: direct execution
As long as it is executing unprivileged
instructions the virtual machine (guest OS +
applications) executes hardware instructions
directly.
If the guest OS tries to execute a privileged
instruction the CPU traps to the VMM which
executes the privileged operation.
Binary Translation
VMware
Paravirtualization
Rewrite portions of the guest OS to replace nonvirtualizable instructions with a trap the VMM,
which emulates the instruction on behalf of the
guest OS
e.g., remove POPFs; substitute something else
Binary Translation
Instead of modifying the OS, detect these
instructions at runtime.
VMwares approach: The DBT (dynamic
binary translator) controls execution of
kernel code - replaces non-virtualizable
instructions with equivalent code that can be
virtualized.
Once translated, code is saved and used again
if needed.
Comparison
Paravirtualization changes the source code of a
guest OS; binary translation changes the binary
code as it executes.
Paravirtualization is more efficient, but requires
modification to the guest OS
Paravirtualization also allows more efficient
interfaces, in some cases
Hardware-assisted Virtualization
AMD-V and Intel VT are architecture extensions to
support virtualization.
New execution modes
Allows guest OS to run in execution ring 0 and VMM in yet a
higher privileged mode
Memory Virtualization
VMM maintains a shadow page table for
each virtual machine.
When the guest OS makes an entry in its
own page table, the VMM makes the
same entry in the shadow table.
Shadow page table points to actual page
frame
The hardware MMU uses the shadow page
table when it translates virtual addresses.
Challenges
Let the guest OS decide which of its pages to
swap out
VMwares ESX Server uses the concept of a
balloon process, running inside the guest OS [1].
When the VMM wants to swap out pages from a
VM it notifies the balloon process to allocate
more memory to itself.
The guest OS must page out unused portions
of other processes to its virtual disk.
The VMM now knows which pages the guest OS
thinks it can do without.
Appendix Examples
Xen
Denali
Hardware Virtual Machines
Xen Intro
Claim: virtualization is better than multitasking as a way to share hardware.
CPU requests, memory demand, disk
accesses, other resource needs of one
process impact the performance of other
processes
Xen solution: multiplex resources at the OS
level instead of the process level.
VM1
Domain 0
Guest
VM2
Application
VM3
Application
Domain U
Guest OS2
Domain U
Guest OS3
Xen
Hardware layer
Domain 0 guest
has privileged
access to the
Xen hypervisor
and can be used
by the system
administrator to
manage the
system.
Separation of
powers
Xen only has to
worry about
multiplexing
hardware to
multiple guests
Zipfs Law
Given a table that ranks something on the basis
of its frequency of occurrence, Zipfs law states
that the most frequent item occurs about twice
as often as the next most frequent item, which in
turn occurs twice as often as the next item, and
so on.
Zipf made this observation about words in a
natural language. Here, were talking about
accesses to various web services.
Proof-of-concept
Denali is the virtualized architecture
Yakima: a VMM which was designed to run in
ring 0 on x86 hardware.
Ilwaco: a simple prototype guest OS which
provides a full set of abstractions to its
applications while hiding the Denali architecture
Reasonable performance in tests
1.4 sec to 9 sec context switch time, depending on
number of VMs
End-to-end run times of network apps were
comparable to those of a traditional operating
system.
Conclusion
The Denali research project terminated in
the mid-2000s.
The Denali research group was right in
supposing that virtual machine technology
would be most useful today to enable
efficient use of server hardware.
Multi-core computing the MPP of the
future? How useful will VMM concepts be?