CS2 - Virtualization
CS2 - Virtualization
SEWP ZG527
BITS Pilani
1
Agenda
Cloud Recap
What is NIST 3-4-5 Rule
Advantages of Cloud
Disadvantages
Introduction to Virtualization
What is Virtualization
Use & demerits of Virtualization
Introducing the Hypervisor
Purpose, Design Goals & Types of Hypervisor
Virtualization
Types of Virtualization
X86 Hardware Virtualization
NFV - VNF
2
Recap
NIST Definitions
• 3 cloud service models or service types for
any cloud platform
• 4 Deployment models
• 5 Essential characteristics of cloud
computing infrastructure
BITS Pilani
BITS Pilani
Pilani|Dubai|Goa|Hyderabad
Introduction to Virtualization
Virtualization History
History
BITS Pilani
Motivations & Origins
Motivation Origins
• Server virtualization has existed for
several decades
• IBM pioneered more than 30 years ago
with the capability to “multitask”
1 machine 1 OS several Applications can affect each
applications other • The inception was in specialized,
proprietary, high-end server and
mainframe systems. By 1980/90 servers
virtualization adoption reduced
• Inexpensive x86 hardware platforms
• Windows/Linux adopted as server
Big disadvantage: machine
utilization is very low, most of
the times it is below than 25%
BITS Pilani
Learning Objectives
BITS Pilani
What is Virtualization?
BITS Pilani
What is Virtualization?
Need of Virtualization
• Cloud can exist without Virtualization, although it will be
difficult and inefficient.
• Cloud makes notion of “Pay for what you use”, “infinite Key Terms:
availability- use as much you want”. VM Virtual Machine
• These notions are practical only if we have VMM Virtual Machine Monitor
– lot of flexibility Hypervisor VMM
– efficiency in the back-end. Multiplexed Many or several
• This efficiency is readily available in Virtualized Environments Host System where the VMM
and Machines resides
Guest Virtual Machines created
BITS Pilani
Virtualization Architecture
BITS Pilani
Hypervisor
• A hypervisor or virtual machine monitor (VMM) is
computer software, firmware, or hardware. VMM creates
and runs virtual machines.
• A computer on which a hypervisor runs one or more
virtual machines is called a host machine,
• Each virtual machine is called a guest machine Bare Metal Hypervisor
Hosted Hypervisor
BITS Pilani
Hypervisor Goals
The main function of the
The virtualization software
software layer for virtualization
creates the abstraction of VM’s
is to virtualize the physical
by interposing a virtual layer
hardware of the host machine
at various levels of the
to virtual resources to be used
computer system.
by guest VM’s
BITS Pilani
Hypervisor - Samples
• BOCHS :
• Bochs is a portable IA-32 and x86-64 IBM PC compatible emulator and debugger mostly written in C++ and distributed as free
software under the GNU Lesser General Public License.
• It supports emulation of the processor, memory, disks, display, Ethernet, BIOS and common hardware peripherals of PCs.
• BSD Jail :
• The jail mechanism is an implementation of FreeBSD's OS-level virtualisation that allows system administrators to partition a
FreeBSD-derived computer system into several independent mini-systems called jails, all sharing the same kernel, with very
little overhead.
Learning Objectives
• It enables emulation to
disparate Instruction sets
Hypervisor Types
• Hosted: A hosted architecture installs and runs the virtualization layer
as an application on top of an operating system and supports the
broadest range of hardware configurations. (VMware Player, ACE)
• Bare Metal : The architecture installs the virtualization layer directly
on a clean x86-based system. Since it has direct access to the
hardware resources rather than going through an operating system, a
hypervisor is more efficient than a hosted architecture and delivers
greater scalability, robustness and performance. (ESX Server)
• Hybrid: The architecture installs the VM layer directly on the hardware
like a bare metal, but also leverages the features of the host OS. Xen
and Microsoft’s Hyper-V are examples of hybrid hypervisors
Design Goals
BITS Pilani
Hypervisor Architecture
Monolithic hypervisor
• Simpler than a modern kernel, but still
complex
• Contains its own drivers model
Microkernel hypervisor
• Simple partitioning functionality
• Increase reliability and minimize lowest level
of the TCB
• No third-party code
• Drivers run within guests
BITS Pilani
Comparison
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.
BITS Pilani
Resource Sharing in VM - CPU
BITS Pilani
Resource Sharing in VM - CPU
A CPU Socket is a physical connector on the motherboard to which a single physical CPU is connected.
A CPU (central processing unit, microprocessor chip, or processor) is a computer component. It is the electronic
circuitry with transistors that is connected to a socket.
A CPU core is the part of a processor(CPU) containing the L1 cache. The CPU core performs computational tasks
independently without interacting with other cores and external components of a “big” processor that are shared
among cores. Basically, a core can be considered as a small processor built into the main processor that is connected
to a socket. Applications should support parallel computations to use multicore processors rationally.
Hyper-threading is a technology developed by Intel engineers to bring parallel computation to processors that have
one processor core. The debut of hyper-threading was in 2002 when the Pentium 4 HT processor was released and
positioned for desktop computers. An operating system detects a single-core processor with hyper-threading as a
processor with two logical cores (not physical cores). Similarly, a four-core processor with hyper-threading appears to
an OS as a processor with 8 cores.
A vCPU is a virtual processor that is configured as a virtual device in the virtual hardware settings of a VM. A virtual
processor can be configured to use multiple CPU cores. A vCPU is connected to a virtual socket.
BITS Pilani
Resource Sharing in VM - Memory
In Multiprogramming there is a
single level of indirection
maintained by Kernel.
Memory sharing relies on the observation that several virtual machines might be running instances of the same guest operating system.
These virtual machines might have the same applications or components loaded, or contain common data.
In such cases, a host uses a proprietary Transparent Page Sharing (TPS) technique to eliminate redundant copies of memory pages.
With memory sharing, a workload running on a virtual machine often consumes less memory than it might when running on physical machines.
As a result, higher levels of overcommitment can be supported efficiently.
The amount of memory saved by memory sharing depends on whether the workload consists of nearly identical machines which might free up more memory.
A more diverse workload might result in a lower percentage of memory savings.
BITS Pilani
Resource Sharing in VM - IO
In a virtualized environment,
Device needs to use Physical the kernel is running in a
Memory location. hypervisor-provided virtual
address space
BITS Pilani
Hypervisor Techniques
BITS Pilani
Hypervisor Techniques
BITS Pilani
Hypervisor Techniques
27
BITS Pilani
Virtualization Summary
•Virtualization allows multiple operating system instances to run concurrently on a single computer. It is a means of
•Each “guest” OS is managed by a Virtual Machine Monitor (VMM), also known as a hypervisor.
•Because the virtualization system sits between the guest and the hardware, it can control the guests’ use of CPU, memory,
and storage, even allowing a guest OS to migrate from one machine to another.
•Instead of purchasing and maintaining an entire computer for one application, each application can be given its own
operating system, and all those operating systems can reside on a single piece of hardware.
•Virtualization allows an operator to control a guest operating system’s use of CPU, memory, storage, and other resources,
BITS Pilani
Key Terms to Remember
Key Terms:
VM : Virtual Machine
Hypervisor : VMM
29
BITS Pilani
Q & A……..
30
Pilani|Dubai|Goa|Hyderabad