V IR TUAL M ACHINES
COMP9242
2006/S2 Week 5
2 minimal slowdown
V IR TUAL M ACHINES
V IR TUAL M ACHINES
V IR TUAL M ACHINES
App
App
App
App
App
App
OS
OS
Virtual Machine
Virtual Machine
V IR TUAL M ACHINES
Guest
Controls resources
partitions hardware
schedules guests
mediates access to shared
resources (eg. console)
performs world switch
OS
Hypervisor
Hardware
Hardware
Implications:
V IR TUAL M ACHINES
VMM T YPES
Native/Classic/Bare-metal/Type-1
Hosted/Type-2
Guest
Guest
Hypervisor
Hypervisor
Hardware
OS
Classic as above
Hosted e.g. VMware GSX Server
Whole-system virtual hardware and operating system
really an emulation
e.g. Virtual PC (for Macintosh)
Hardware
V IR TUAL M ACHINES
V IR TUAL M ACHINES
An architecture is virtualizable if all sensitive instructions are privileged (called pure virtualisation)
Definitions:
Privileged instruction executes in privileged mode, traps in user mode
Note: trap is required, NOOP is insufficient!
V IR TUAL M ACHINES
V IR TUAL M ACHINES
10
V IR TUALISATION OVERHEADS
V IR TUAL M ACHINES
11
V IR TUAL M ACHINES
12
I MPURE V IR TUALISATION
PARAVIR TUALISATION
New name, old technique
Guest
unvirtualisable architectures
performance problems of virtualisation
Hypervisor
Hardware
Drawbacks:
2
V IR TUAL M ACHINES
13
B INARY T RANSLATION
V IR TUAL M ACHINES
14
V IR TUAL M ACHINES
Page sharing
15
V IR TUAL M ACHINES
16
P REVIR TUALISATION
Combines advantages of pure and para-virtualisation
Guest
Multi-stage process
Drivers in VMM
maybe ported legacy drivers
Host drivers
for hosted VMMs
Virtualisation-friendly devices
V IR TUAL M ACHINES
17
M ICROKERNEL AS A H YPERVISOR
Xen
Guest
Hypervisor
Hardware
Hardware
V IR TUAL M ACHINES
18
H YPERVISORS VS . M ICROKERNELS
L4
Guest
UML/LoL
Guest
inplace VMM
Guest
Microkernel
OS
Hardware
Hardware
V IR TUAL M ACHINES
Guest
inplace VMM
Hypervisor
Microkernel
Hardware
Hardware
Hypervisor
Microkernel
Features:
inplace VMM
19
V IR TUAL M ACHINES
20
H ARDWARE S UPPOR T
[s]
CPU O/H
[%]
[%]
Netperf send
Xput
CPU
Netperf receive
Cost
Xput
CPU
Cost
native
209
98.4
867.5
27
6.7
780.4
34
9.2
Linux on Xen
219
97.8
867.6
34
8.3
780.7
41
11.3
Linux on L4
236
97.9
13
866.5
30
7.5
780.1
36
9.8
V IR TUAL M ACHINES
21
Secure World
App
App
OS
V IR TUAL M ACHINES
22
[BDF+ 03] Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim
Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, and Andrew
Warfield. Xen and the art of virtualization. In 19th SOSP,
pages 164177, Bolton Landing, NY, USA, Oct 2003.
[BDGR97] Edouard Bugnion, Scott Devine, Kinshuk Govil, and Mendel
Rosenblum. Disco: Running commodity operating systems
on scalable multiprocessors. Trans. Comp. Syst.,
15:412447, 1997.
[HHL+ 97] Hermann Hrtig, Michael Hohmuth, Jochen Liedtke,
Sebastian Schnberg, and Jean Wolter. The performance
of -kernel-based systems. In 16th SOSP, pages 6677, St.
Malo, France, Oct 1997.
V IR TUAL M ACHINES
R EFERENCES
[HUL06]
23
V IR TUAL M ACHINES
24
R EFERENCES
R EFERENCES
V IR TUAL M ACHINES
[SN05]
[WSG02]
[RG05]
25
V IR TUAL M ACHINES
26