0% found this document useful (0 votes)
114 views31 pages

CS2 - Virtualization

The document discusses cloud computing and virtualization. It defines key concepts from the NIST model such as cloud service models, deployment models, and essential cloud characteristics. It then introduces virtualization, defining a virtual machine, hypervisor, host and guest. The purposes of virtualization are described as abstraction, replication, and isolation. Virtualization allows multiple operating systems to run concurrently on a single computer by virtualizing the underlying physical hardware.

Uploaded by

Asmita Kandar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
114 views31 pages

CS2 - Virtualization

The document discusses cloud computing and virtualization. It defines key concepts from the NIST model such as cloud service models, deployment models, and essential cloud characteristics. It then introduces virtualization, defining a virtual machine, hypervisor, host and guest. The purposes of virtualization are described as abstraction, replication, and isolation. Virtualization allows multiple operating systems to run concurrently on a single computer by virtualizing the underlying physical hardware.

Uploaded by

Asmita Kandar
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 31

Cloud Computing

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

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


BITS Pilani
Pilani|Dubai|Goa|Hyderabad

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

Electronic Numerical Integrator And Computer

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

Video – Virtualization • Introduce Oracle Virtual Box, a


hosted hypervisor.

• Demonstrate what a host system


is what a guest VM is and what is
the role of the hypervisor.

• Students will use the same as


home work and install virtual
box and a choice of their own OS
after class.
What is Virtualization?

Virtualization Defined Key Terms:


 VM  Virtual Machine
Virtualization is a computer architecture technology by which multiple  VMM  Virtual Machine Monitor
virtual machines (VMs) are multiplexed in the same hardware machine.
 Hypervisor  VMM
 Multiplexed  Many or several
 Host  System where the VMM
Virtualization allows multiple operating system instances to run resides
concurrently on a single computer
 Guest  Virtual Machines created

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, so each guest receives
only the resources that it needs.

BITS Pilani
What is Virtualization?

Virtualization Objectives Key Terms:


 VM  Virtual Machine
 VMM  Virtual Machine Monitor
 Hypervisor  VMM
 Multiplexed  Many or several
 Host  System where the VMM
resides
 Guest  Virtual Machines created

ABSTRACTION – TO SIMPLIFY THE REPLICATION – TO CREATE ISOLATION – TO SEPARATE THE USES


USE OF THE UNDERLYING RESOURCE MULTIPLE INSTANCES OF THE WHICH CLIENTS MAKE OF THE
(E.G., BY REMOVING DETAILS OF RESOURCE (E.G., TO SIMPLIFY UNDERLYING RESOURCES (E.G., TO
THE RESOURCE’S STRUCTURE) MANAGEMENT OR ALLOCATION) IMPROVE SECURITY)

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

• OS assumes complete control of the


underlying hardware.
• Virtualization architecture provides this
illusion through a hypervisor/VMM.
• Hypervisor/VMM is a software layer which:
• Allows multiple Guest OS (Virtual Machines)
to run simultaneously on a single physical
host
• Provides hardware abstraction to the running
Guest OSs and efficiently multiplexes
underlying hardware resources

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

• The hypervisor presents the guest systems with a 


virtual operating platform and manages the execution of
the guest operating systems.
• Multiple instances of a variety of operating systems may
share the virtualized hardware resources: 

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

At the ISA level, virtualization is For example, MIPS binary code


performed by emulating a can run on an x86-based host
given ISA on the ISA of the host machine with the help of ISA
machine. emulation.

With this approach, it is


possible to run a large amount
Instruction set emulation leads
of legacy binary code written
to virtual ISAs created on any
for various processors on any
hardware machine.
given new hardware host
machine.

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

Video – BOCHS • Hypervisors can be used at any


abstraction level.

• Oracle Virtual Box was an


example of an hardware
abstraction.

• We will see Bochs (pronounced


Box), which is an ISA abstraction.

• 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

• Reliability • Isolation • Scalability


• Minimal code base • Security isolation • Scale to large number of cores
• Strictly layered design • Fault isolation • Large memory systems
• Not extensible • Resource isolation

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

VMM or Hypervisor provides a


virtual view of CPU to VMs.

In multi processing, CPU is allotted


to the different processes in form
of time slices by the OS.

Similarly VMM or Hypervisor allots


CPU to different VMs.

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.

In case of Virtual Machines


there is one more level of
indirection maintained by VMM

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

Allowing the guest kernel to


Each device defines its own
convey an arbitrary location
protocol for talking to
to device for writing is a
drivers
serious security hole

BITS Pilani
Hypervisor Techniques

• At a very high level, all three types of


hypervisors described earlier operate in a
similar manner.

• In each case, the guests continue execution


until they try to access a shared physical
resource of the hardware (such as an I/O
device), or an interrupt is received.

• When this happens, the hypervisor regains


control and mediates access to the hardware,
or handles the interrupt.

BITS Pilani
Hypervisor Techniques

• To accomplish this functionality, hypervisors rely on a feature of modern processors


known as the privilege level or protection ring.
• The basic idea behind privilege levels is that all instructions that modify the physical
hardware configuration are permitted at the highest level,
• At lower levels, only restricted sets of instructions can be executed.
• There are four rings, numbered from 0 to 3.
• Programs executing in Ring 0 have the highest privileges, and are allowed to execute
any instructions or access any physical resources such as memory pages or I/O devices.
• Guests are typically made to execute in ring 3. This is accomplished by setting the
Current Privilege Level (CPL) register of the processor to 3 before starting execution of
the guest.

BITS Pilani
Hypervisor Techniques

• If the guest tries to access a protected resource, such


as an I/O device, an interrupt takes place, and the
hypervisor regains control.

• The hypervisor then emulates the I/O operation for the


guest.

• The exact details depend upon the particular


hypervisor (e.g., Xen or Hyper-V).

• Note that in order to emulate the I/O operation, it is


necessary for the hypervisor to have maintained the
state of the guest and its virtual resources
BITS Pilani
Benefits of Virtualization

• Single OS image per machine • Hardware-independence of


• Software and hardware tightly operating system and
coupled applications
• Running multiple applications on • Virtual machines can be
same machine often creates provisioned to any system
conflict
• Can manage OS and
• Underutilized resources
application as a single unit by
• Inflexible and costly
encapsulating them into
infrastructure
virtual machines

27

BITS Pilani
Virtualization Summary

•Virtualization allows multiple operating system instances to run concurrently on a single computer. It is a means of

separating hardware from a single operating system.

•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,

so each guest receives only the resources that it needs. 28

BITS Pilani
Key Terms to Remember

Key Terms:

VM : Virtual Machine

VMM: Virtual Machine Monitor

Hypervisor : VMM

Multiplexed: Many or several

Host: System where the VMM resides

Guest : Virtual Machines created

29

BITS Pilani
Q & A……..

30

• BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956


Credits
BITS Pilani •Hwang, Kai; Dongarra, Jack; Fox, Geoffrey C.. Distributed and Cloud Computing: From Parallel Processing to the Internet of Things (Kindle Locations 3532-3533). Elsevier Science. Kindle Edition.

Pilani|Dubai|Goa|Hyderabad

SSZC313 Object Oriented Programming and 31


23/07/2017
Design

You might also like