Unit 2 - Chapter 3.1
Unit 2 - Chapter 3.1
3
3.1 IMPLEMENTATION
LEVELS OF
VIRTUALIZATION
• Virtualization is a computer architecture technology by which multiple virtual
machines (VMs) are multiplexed in the same hardware machine.
• The idea of VMs can be dated back to the 1960s [53]. The purpose of a VM is
to
enhance resource sharing by many users and improve computer performance
• in terms of resource utilization and application flexibility.
• Hardware resources (CPU, memory, I/O devices, etc.) or software resources
(operating system and software libraries) can be virtualized in various functional
layers.
• This virtualization technology has been revitalized as the demand for distributed
and cloud computing increased sharply in recent years [41].
4
3.1.1 Levels of
Virtualization
Implementation
• A traditional computer runs with a host operating system specially tailored for its
hardware architecture, as shown in Figure 3.1(a).
• After virtualization, different user applications managed by their own operating
systems (guest OS) can run on the same hardware, independent of the host OS.
• This is often done by adding additional software, called a virtualization layer as
shown in Figure 3.1(b).
• This virtualization layer is known as hypervisor or virtual machine monitor (VMM)
[54]. The VMs are shown in the upper boxes, where applications run with their
own guest OS over the virtualized CPU, memory, and I/O resources.
• The main function of the software layer for virtualization is to virtualize the physical
hardware of a host machine into virtual resources to be used by the VMs,
exclusively.
• This can be implemented at various operational levels, as we will discuss shortly.
5
3.1.1 Levels of Virtualization Implementation
6
2.1.2 Design Objectives of Computer
Clusters
• The virtualization software creates the
abstraction of VMs by interposing a
virtualization layer at various levels of a
computer system.
7
3.1.1.1 Instruction Set Architecture Level
• At the ISA level, virtualization is performed by emulating a given ISA by the ISA
of the host machine.
• For example, MIPS binary code can run on an x86-based host machine with
the help of ISA emulation. With this approach, it is possible to run a large
amount of legacy binary code written for various processors on any given new
hardware host machine. Instruction set emulation leads to virtual ISAs
created on any hardware machine.
• The basic emulation method is through code interpretation. An interpreter
program interprets the source instructions to target instructions one by one.
One source instruction may require tens or hundreds of native target
instructions to perform its function. Obviously, this process is relatively slow.
• For better performance, dynamic binary translation is desired. This approach
translates basic blocks of dynamic source instructions to target instructions.
• A virtual instruction set architecture (V-ISA) thus requires adding a processor-
specific software translation layer to the compiler.
8
3.1.1.2 Hardware
Abstraction Level
• Hardware-level virtualization is performed right on top of the bare
hardware.
• On the one hand, this approach generates a virtual hardware environment
for a VM. The process manages the underlying hardware through
virtualization.
• The idea is to virtualize a computer’s resources, such as its processors,
memory, and I/O devices.
• The intention is to upgrade the hardware utilization rate by multiple
users concurrently.
• The idea was implemented in the IBM VM/370 in the 1960s. More
recently, the Xen hypervisor has been applied to virtualize x86-based
machines to run Linux or other guest OS applications.
• We will discuss hardware virtualization approaches in more detail in
Section 3.3.
9
3.1.1.3 Operating System Level
10
3.1.1.4 Library Support
Level
• Most applications use APIs exported by user-level libraries rather than using
• lengthy system calls by the OS.
• Since most systems provide well-documented APIs, such an interface becomes another candid
virtualization. Virtualization with library interfaces is possible by controlling the communicatio
between applications and the rest of a system through API hooks.
• The software tool WINE has implemented this approach to support Windows applications on top o
hosts.
• Another example is the vCUDA which allows applications executing within VMs to leverage GPU ha
acceleration.
• This approach is detailed in Section 3.1.4.
11
3.1.1.5 User-Application
Level
• Virtualization at the application level virtualizes an application as a VM. On a
traditional OS, an application often runs as a process.
• Therefore, application-level virtualization is also known as process-level virtualization.
• The most popular approach is to deploy high level language (HLL) VMs. In this scenario,
the virtualization layer sits as an application program on top of the operating system,
and the layer exports an abstraction of a VM that can run programs written and
compiled to a particular abstract machine definition.
• Any program written in the HLL and compiled for this VM will be able to run on it.
• The Microsoft .NET CLR and Java Virtual Machine (JVM) are two good examples of this
class of VM.
• Other forms of application-level virtualization are known as application isolation,
application sandboxing, or application streaming. The process involves wrapping the
application in a layer that is isolated from the host OS and other applications. The
result is an application that is much easier to distribute and remove from user
workstations.
• An example is the LANDesk application virtualization platform which deploys software
applications as self-contained, executable files in an isolated environment without
requiring installation, system modifications, or elevated security privileges.
12
3.1.1.6 Relative Merits of Different Approaches
• Table 3.1 compares the relative merits of implementing virtualization at various levels. The
column headings correspond to four technical merits.
• “Higher Performance” and “Application Flexibility” are self-explanatory.
• “Implementation Complexity” implies the cost to implement that particular virtualization
level.
• “Application Isolation” refers to the effort required to isolate resources committed to
different VMs.
• Each row corresponds to a particular level of virtualization.
• The number of X’s in the table cells reflects the advantage points of each implementation
level. Five X’s implies the best case and one X implies the worst case.
• Overall, hardware and OS support will yield the highest performance. However, the hardware
and application levels are also the most expensive to implement.
• User isolation is the most difficult to achieve. ISA implementation offers the best application
flexibility.
13
3.1.2 VMM Design Requirements and Providers
• As mentioned earlier, hardware-level virtualization inserts a layer between real hardware and
traditional operating systems. This layer is commonly called the Virtual Machine Monitor (VMM)
and it manages the hardware resources of a computing system.
• Each time programs access the hardware, the VMM captures the process. In this sense, the VMM
acts as a traditional OS. One hardware component, such as the CPU, can be virtualized as several
virtual copies. Therefore, several traditional operating systems which are the same or different can
sit on the same set of hardware simultaneously.
• Two possible exceptions in terms of differences are permitted with this requirement:
• 1) differences caused by the availability of system resources . This one arises when more than one
VM is running on the same machine. The hardware resource requirements, such as memory, of
each VM are reduced, but the sum of them is greater than that of the real machine installed.
• 2) differences caused by timing dependencies. This qualification is required because of the
intervening level of software and the effect of any other VMs concurrently existing on the same
hardware.
14
3.1.2 VMM Design Requirements and Providers
15
3.1.2 VMM Design Requirements and Providers
• Table 3.2 compares four hypervisors and VMMs that are in use today.
16
3.1.2 VMM Design Requirements and Providers
17
3.1.3 Virtualization Support at the OS Level
18
3.1.3 Virtualization Support at the OS Level
19
3.1.3.1 Why OS-Level Virtualization?
20
3.1.3.1 Why OS-Level Virtualization?
21
3.1.3.2 Advantages of OS Extensions
• In cloud computing, the first and second benefits can be used to overcome
the defects of slow initialization of VMs at the hardware level, and being
unaware of the current application state, respectively.
22
3.1.3.3 Disadvantages of OS Extensions
• The main disadvantage of OS extensions is that all the VMs at operating system
level on a single container must have the same kind of guest operating system.
That is, although different OS-level VMs may have different operating system
distributions, they must pertain to the same operating system family.
• For example, a Windows distribution such as Windows XP cannot run on a Linux-
based container. However, users of cloud computing have various preferences.
Some prefer Windows and others prefer Linux or other operating systems.
Therefore, there is a challenge for OS-level virtualization in such cases.
• Figure 3.3 illustrates the concept of OS-level virtualization. The virtualization layer
is inserted inside the OS to partition the hardware resources for multiple VMs to
run their applications in multiple virtual environments. To implement OS-level
virtualization, isolated execution environments (VMs) should be created based on
a single OS kernel.
• Furthermore, the access requests from a VM need to be redirected to the VM’s
local resource partition on the physical machine. For example, the chroot
command in a UNIX system can create several virtual root directories
within a host OS.
23
3.1.3.4 Virtualization on Linux or Windows Platforms
25