virtualization
virtualization
1 VIRTUALIZATION
• Virtualization is a technique, which allows sharing single physical instance of an
application or resource among multiple organizations or tenants (customers).
• Virtualization hides the physical characteristics of computing resources from their users,
applications, or end users.
• This includes making a single physical resource (such as a server, an operating system, an
application, or storage device) appear to function as multiple virtual resources.
• It can also include making multiple physical resources (such as storage devices or servers)
appear as a single virtual resource.
• In computing, virtualization refers to the act of creating a virtual (rather than actual)
version of something, like computer hardware platforms, operating systems, storage
devices, and computer network resources
• Creation of a virtual machine over existing operating system and hardware.
Advantages of Virtualization:
1. Reduced Costs.
5. Increase Availability
6. Save energy
1. Extra Costs.
2. Software Licensing.
Figure 2.12 Virtualization ranging from hardware to applications in five abstraction levels.
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. OneSource 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.
The basic blocks can also be extended to program traces or super blocks to increase translation
efficiency. Instruction set emulation requires binary translation and optimization. A virtual
instruction set architecture (V-ISA) thus requires adding a processor-specific software translation
layer to the compiler.
Hardware Abstraction Level:
Hardware-level virtualization is performed right on top of the bare hardware. 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.
Operating System Level:
This refers to an abstraction layer between traditional OS and user applications. OS-level
virtualization creates isolated containers on a single physical server and the OS instances to utilize
the hardware and software in datacenters.
The containers behave like real servers. OS-level virtualization is commonly used in
creating virtual hosting environments to allocate hardware resources among a large number of
mutually distrusting users. It is also used, to a lesser extent, in consolidating server hardware by
moving services on separate hosts into containers or VMs on one server.
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 candidate for virtualization.
Virtualization with library interfaces is possible by controlling the communication link
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 of UNIX hosts. Another
example is the vCUDA which allows applications executing within VMs to leverage GPU
hardware acceleration.
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.
Advantages of OS Extensions
(1) VMs at the operating system level have minimal startup/shutdown costs, low resource
requirements, and high scalability.
(2) For an OS-level VM, it is possible for a VM and its host environment to synchronize
state changes when necessary.
These benefits can be achieved via two mechanisms of OS-level virtualization:
(1) All OS-level VMs on the same physical machine share a single operating system kernel
(2) The virtualization layer can be designed in a way that allows processes in VMs to access as
many resources of the host machine as possible, but never to modify them.
Full Virtualization:
With full virtualization, noncritical instructions run on the hardware directly while critical
instructions are discovered and replaced with traps into the VMM to be emulated by software.
Both the hypervisor and VMM approaches are considered full virtualization.
Binary Translation of Guest OS Requests Using a VMM :
VMware puts the VMM at Ring 0 and the guest OS at Ring 1. The VMM scans the
instruction stream and identifies the privileged, control- and behavior-sensitive instructions. When
these instructions are identified, they are trapped into the VMM, which emulates the behavior of
these instructions.
Figure 2.13 Indirect execution of complex instructions via binary translation of guest OS
requests using the VMM plus direct execution of simpleinstructions on the same host.
The method used in this emulation is called binary translation. Therefore, full virtualization
combines binary translation and direct execution. The guest OS is completely decoupled from the
underlying hardware. Consequently, the guest OS is unaware that it is being virtualized. Binary
translation employs a code cache to store translated hot instructions toimprove performance, but it
increases the cost of memory usage.
Host-Based Virtualization:
An alternative VM architecture is to install a virtualization layer on top of the host OS.
This host OS is still responsible for managing the hardware. The guest OSes are installed and run
on top of the virtualization layer. Dedicated applications may run on the VMs. Certainly, some
other applications can also run with the host OS directly. This host-based architecture has some
distinct advantages, as enumerated next. First, the user can install this VM architecture without
modifying the host OS. The virtualizing software can rely on the host OS to provide device drivers
and other low level services. This will simplify the VM design and ease its deployment. Second,
the host-based approach appeals to many host machine configurations.
Compared to the hypervisor/VMM architecture, the performance of the host based architecture
may also be low. When an application requests hardware access, it involves four layers of mapping
which downgrades performance significantly.
Para-Virtualization Architecture:
When the x86 processor is virtualized, a virtualization layer is inserted
between the hardware and the OS. According to the x86 ring definitions, the
virtualization layer should also be installed at Ring 0. The para-virtualization
replaces non virtualizable instructions with hyper calls that communicate
directly with the hypervisor or VMM. However, when the guest OS kernel is
modified for virtualization, it can no longer run on the hardware directly.
Although para-virtualization reduces the overhead, it has incurred
other problems. First, its compatibility and portability may be in doubt,
because it must support the unmodified OS as well. Second, the cost of
maintaining para-virtualized OSes is high, because they may require deep OS
kernel modifications. Finally, the performance advantage of para
virtualization varies greatly due to workload variations.