Unit-2 CC
Unit-2 CC
2
IMPLEMENTATION LEVELS OF VIRTUALIZATION
3
Virtualization for Datacenter Automation
to serve millions of clients, simultaneously
7
(Courtesy of VMWare, 2008)
9
Virtualization at ISA (Instruction Set Architecture) level:
Emulating a given ISA by the ISA of the host machine.
•e.g, MIPS binary code can run on an x-86-based host machine with the
help of ISA emulation.
• Typical systems: Bochs, Crusoe, Quemu, BIRD, Dynamo
Advantage:
• It can run a large amount of legacy binary codes written for
various processors on any given new hardware host machines
• best application flexibility
Shortcoming & limitation:
• One source instruction may require tens or hundreds of native
target instructions to perform its function, which is relatively slow.
• V-ISA requires adding a processor-specific software translation
layer in the complier.
Copyright © 2012, Elsevier Inc. All rights reserved. 10 1 - 10
Virtualization at Hardware Abstraction level:
Virtualization is performed right on top of the hardware.
•It generates virtual hardware environments for VMs, and manages the
underlying hardware through virtualization.
•Typical systems: VMware, Virtual PC, Denali, Xen
Advantage:
•Has higher performance and good application isolation
Shortcoming & limitation:
•Very expensive to implement (complexity)
Advantage:
•Has minimal starup/shutdown cost, low resource requirement, and high
scalability; synchronize VM and host state changes.
Advantage:
•It has very low implementation effort
Advantage:
•has the best application isolation
34
35
CPU Virtualization
A VM is a duplicate of an existing computer system in which
a majority of the VM instructions are executed on the host
processor in native mode.
The critical instructions are divided into three categories:
privileged instructions,
controlsensitive instructions, and
behavior-sensitive instructions.
Privileged instructions execute in a privileged mode and will
be trapped if executed outside this mode.
Control-sensitive instructions attempt to change the
configuration of resources used.
Behavior-sensitive instructions have different behaviors
depending on the configuration of resources, including the
load and store operations over the virtual memory.
36
37
Memory Virtualization
Virtual memory virtualization is similar to the virtual
memory support provided by modern operating systems. In a
traditional execution environment, the operating system
maintains mappings of virtual memory to machine memory
using page tables, which is a one-stage mapping from virtual
memory to machine memory.
All modern x86 CPUs include a memory management unit
(MMU) and a translation lookaside buffer (TLB) to optimize
virtual memory performance.
However, in a virtual execution environment, virtual memory
virtualization involves sharing the physical system memory in
RAM and dynamically allocating it to the physical memory of
the VMs.
That means a two-stage mapping process should be maintained
by the guest OS and the VMM, respectively: virtual memory to
physical memory and physical memory to machine memory.
38
39
40
I/O Virtualization
I/O virtualization involves managing the routing of
I/O requests between virtual devices and the shared
physical hardware. At the time of this writing, there
are three ways to implement I/O virtualization:
full device emulation,
para-virtualization, and
Direct I/O.
41
42
43
Conclusions on CPU, Memory
and I/O Virtualization :
CPU virtualization demands hardware-assisted traps of
sensitive instructions by the VMM
Figure 3.16 Four VCPUs are exposed to the software, only three cores are actually
present. VCPUs V0, V1, and V3 have been transparently migrated, while VCPU V2
has been transparently suspended. (Courtesy of Wells, et al., “Dynamic
Heterogeneity and the Need for Multicore Virtualization”, ACM SIGOPS Operating
Systems Review, ACM Press, 2009 [68] )
49
Virtual Cluster Characteristics
The virtual cluster nodes can be either physical or virtual machines. Multiple VMs
running with different OSs can be deployed on the same physical node.
A VM runs with a guest OS, which is often different from the host OS, that manages the
resources in the physical machine, where the VM is implemented.
The purpose of using VMs is to consolidate multiple functionalities on the same server.
This will greatly enhance the server utilization and application flexibility.
VMs can be colonized (replicated) in multiple servers for the purpose of promoting
distributed parallelism, fault tolerance, and disaster recovery.
The size (number of nodes) of a virtual cluster can grow or shrink dynamically, similarly to
the way an overlay network varies in size in a P2P network.
The failure of any physical nodes may disable some VMs installed on the failing nodes.
But the failure of VMs will not pull down the host system.
63
Parallax for VM Storage Management