0% found this document useful (0 votes)
5 views

Chapter 2

rf

Uploaded by

yemantsegaye24
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Chapter 2

rf

Uploaded by

yemantsegaye24
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Institute of Technology

School of Computing
Department of Software Engineering
Fundamentals of Cloud computing
“Chapter 2 : Basics of Virtualization”

By Abebaw S.
12/5/2024 1
Outline

12/5/2024 2
Introduction
• It is a software like a physical computer
that can run an OSs and applications.
• Each virtual machine contains its own
V i r t u a l
virtual hardware
machine
• Virtual hardware may CPU, memory,
hard disk, and network interface card
etc.
• It is the process of creating a virtual
version of something like computer
hardware.
Virtualizatio
n • It is one of the main cost effective,
hardware cost reducing, and energy
12/5/2024
s a v i n g t e c h n i q u e s u s e d b y c l o3u d
providers
With the help of Virtualization

Multiple OSs and applications can run on


same machine at the same time,
increasing the utilization and flexibility of
hardware.

Share a single physical instance of a


resource and application among
customers and organizations at a time.

Provide a virtual applications storage,


memory, and networking.
12/5/2024 4
Cont’d…
Host Machin: It is a physical
machine that a virtual machine
is going to be built.

Guest Machine : virtual


machine that runs on top of a
host machine.

Virtualization example
• Dividing your actual hard drive into
different partitions.
12/5/2024
• A partition is the logical division of 5
a hard disk drive (e.g. C:, D:, E:
Traditional Vs. Virtual Server Model

Traditional Server Model Virtual Server Model

12/5/2024 6
Why Virtualization?

Most servers only use 5-15% of their capabilities on


average, while consuming 60-90% of their peak
power.

• Use one server to host multiple applications.


Solution
Virtualization
• Reduce energy consumption
• Reduce CO2 emissions

• Operating fewer servers that are highly


utilized creates additional space and reduces
Generally power consumption
12/5/2024
• U s i n g l e s s s p a c e a n d p o w e r i s m o r7e
environmentally friendly and reduces costs.
M o r e
Benefits of Virtualization flexible
a
E n h na n c d
e
e fficient
developme
allocation
n Itt l o w e r s
productivitthe
o f cost of
R e m oI t e
resources. T
y.
a c c e infrastruct
ss
and rapid ure.
High availability and disaster recovery.scalability.
Pay peruse of the IT infrastructure on demand.
Enables running multiple operating systems.
Increase Up Time
Reduce CO2 Emissions, Power and Cooling Requirements

12/5/2024 8
Types of Virtualization
Hardware
Virtualizati
Operating
onsystem
Application
Virtualizati
onVirtualizati
Network
on
Virtualizati
on Desktop
Virtualizati
Storage
on Virtualizati
Server Virtualization on

Data Virtualization

12/5/2024 9
Hardware Virtualization

Occurs when virtual machine software or virtual machine


manager (VMM) is directly installed on the hardware

The main responsibility of hypervisor is to control and


monitoring the processor, memory and other hardware
resources.

We can install different OS on VMM and run different


applications on those OS
Mainly done for the server
platforms, because controlling
virtual machines is much easier
than controlling a physical
12/5/2024 server. 10
Operating System Virtualization
Occurs when the virtual machine software or virtual machine
manager (VMM) is installed on the Host operating system
instead of directly on the hardware system
This is mainly used for testing the applications on different
platforms of OS.

12/5/2024 11
Application Virtualization

Allows users to access and use an application from a remote


server than the one on which the application is installed.

Admins can set up remote applications on a server and deliver


the apps to an end user’s computer.

The server stores all personal information and other


characteristics of the application
For the user, the experience of
the virtualized app is the same
as using the installed app on a
12/5/2024 physical machine. 12
Network Virtualization

It is a process of logically grouping physical networks and


making them operate as single or multiple independent
networks

The ability to run multiple virtual networks with each has a


separate control and data plan

It co-exists together on top of one physical network. It can be


managed by individual parties that potentially confidential to
each other.
It provides logical switches,
routers, firewalls, load balancer,
VPN, and workload security
12/5/2024
within days or even in weeks. 13
Desktop Virtualization

It is technology that lets users simulate a workstation load to


access a desktop from a connected device.

It separates the desktop environment and its applications from


the physical client device used to access it.

It allows the users’ OS to be remotely stored on a server in


the data center.
Main benefits User mobility,
Portability, Easy management
of software installation, updates,
12/5/2024
and patches. 14
Storage Virtualization
The process of combining
physical storage from several
storage devices into that
appears to be a single storage
device is known as storage
virtualization.

It consists of a collection of servers that are managed by a


virtual storage system.

Like worker bees in a hive, the servers operate without


knowing the precise location of their data

12/5/2024 15
Server Virtualization

Server virtualization is the process of dividing a physical server


into multiple unique and isolated virtual servers by means of a
software application.

Each virtual server can run its own OS independently


yEach sub-server knows the identity of the central server

Increase performance and reduces the operating cost by the


deployment of main server resources into a sub-server
resource.
Advantages: Virtual migration,
Reduce energy consumption ,
12/5/2024
Reduce infrastructural cost etc. 16
Data Virtualization
Data virtualization is a technology that
allows users to access and manipulate
data from various sources as if it were in a
single location without knowing more
about the technical information like how
data is collected, stored & formatted.
Several Big companies such as Oracle, IBM, and CData,
offer their services. These can be utilized for a variety of
tasks, such as:
• Data integration
• Business integration
• Service-oriented architecture data services
• Searching organizational data
12/5/2024 17
Implementations Levels Virtualization
The are Five Levels of Implementing
Virtualization

1. Instruction Set Architecture Level (ISA)

2. Hardware Abstraction Level (HAL)

3. Operating System Level

4. Library Level

5. Application Level
12/5/2024 18
Instruction Set Architecture Level (ISA)
ISA virtualizaticanon work through
ISA emulation.
Used to run many legacy codes
written for a different HW
configuration.
These codes run on any virtual
machine using the ISA.

With this , binary code that


originally needed some additional
Itl acan
y e ralso
s t o be
r u nmodified
, now catop run
a b l eono f
the x64 machine.
running For the basic
on the x86 machines.
emulation, an interpreter is needed,
which interprets the source code
12/5/2024 and then converts it into a hardware 19

format that can be read.


Hardware Abstraction Level (HAL)
HAL enables virtualization to operate at t h
hardware level.
VM manages the HW using the virtualization proce
Virtualization HW components such as I/O devic
the memory, the processor, etc.
Utilization rate is improved by having multip
concurrent users.
This is mostly used in the cloud based infrastructure
Example: Xen/VMware
12/5/2024 20
OS Level Virtualization
Create an abstraction layer between traditional O
and user applications.
Also known as Containers.
An isolated containers are created on sing
physical server
The containers function like actual servers

Examples: Jail, Virtual environment

12/5/2024 21
Library Level Virtualization

It is the final stage of virtualization


deployment in cloud computing,
utilized when intended to virtualize a
single application.
Also known as process level
virtualization; since application
typically run as a process.

Examples JVM/ .NET CLR

12/5/2024 22
API hooks
Application Level Virtualization are
used to control
t h e
Applications
communication
utilize the user-
b e t w e e n
Examples WINE / vCUDA level APIs from
application and
the libraries when
the rest of the
the operating
What is system.
API? is
system
unmanageable.
• API stands for
A p p l•i cSince
a t i oAPI
n
P r o g r ainterfaces
m m i n g are
Interface. good candidates
12/5/2024 23
• Interfaceforcan be
virtualization.
Virtualization Structures /Tools and
Mechanism
In general, there are three typical classes of VM
architecture.
Figure on the next slide shows the architectures of a
machine before and after virtualization. Before virtualization,
the operating
system manages the
After virtualization, a virtualization layerhardware.
Tis
h einserted
v i r t u a lbetween
ization
the hardware and the operating system.layer is responsible
for converting
portions of the real
12/5/2024
hardware into virtual 24
hardware.
Virtualization Structures /Tools and Mechanism

12/5/2024 25
Virtualization Structures /Tools and
Mechanism

OS such as Linux and Windows can run on the same


physical machine, simultaneously.

Depending on the position of the virtualization layer,


there are several classes of VM architectures, namely
the hypervisor architecture, para-virtualization, and
host-based virtualization.

The hypervisor is also known as the VMM (Virtual


Machine Monitor).
12/5/2024 26
Hypervisor

A hypervisor is a process that creates and runs VMs


A hypervisor is a hardware virtualization technique
allowing multiple OS, to run on a host machine.
Hardware-level virtualization on bare metal devices like
CPU, memory, disk and network interfaces.
The hypervisor software sits directly between the
physical hardware and its OS.
The hypervisor provides hypercalls for the guest OSes
and applications.
Generally there
are two types
12/5/2024 27
of hypervisors
Hypervisor

Type 1
• It is also known as a Native or Bare metal
hypervisor
Type
• Runs2 directly on the host’s hardware
It does
• Also not require
called Hosted any base server
Hypervisor
• operating
Run over asystemhost operating system
•• It
It has
is thedirect access
second layertoover
hardware resources.
the hardware
• Guest OS run a layer over the hypervisor.
12/5/2024 28
• The OS is usually unaware of the
12/5/2024 29
Binary Translation with Full Virtualization

Depending on implementation
technologies, hardware virtualization can
be classified into two categories:
• Full virtualization
Full virtualization
• Host-based virtualization.
• It does not need to modify the host OS.
• It relies on binary translation to trap and
The guest OSes
to virtualize and theirofapplications
the execution certain
c osensitive,
n s i s t o fnon
n ovirtualizable
n c r i t i c a l ainstructions.
nd critical
instructions.

12/5/2024 30
Binary Translation of Guest OS Requests Using a
VMM

12/5/2024 31
Host-based virtualization
I n s t a l l a
virtualization layer
on top of the host
OS.
Advantages.
• The user can
install VM
Disadvantages
without
• Performance
modifying the is
low
host to
OS.be useful
in practice.
• Flexible
W h e n a n
12/5/2024 application 32
r e q u e s t s
Para-virtualization

V
It needs to M
p r o v i dthe
modify es
sguest
p e OS
cial
APIs to OS
modification
Performanc
se i n u s e r
applications.
degradation
is a critical
issue

12/5/2024 33
CPU, Memory, and I/O Virtualization
To support virtualization, processors such as the
x86 utilize a special running mode and instructions,
known as hardware-assisted virtualization.

In this way:
• The VMM and guest OS run in different modes
and,
• All sensitive instructions of the guest OS and its
Toapplications are trapped
save processor in the
states, VMM.
mode switching is
completed by hardware.

For x86 architecture, Intel and AMD have


proprietary technologies for hardware-assisted
12/5/2024 34
virtualization.
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.

Thus, unprivileged instructions of VMs run


directly on the host machine for higher efficiency.

Other critical instructions should be handled


carefully for correctness and stability.

Critical instructions are divided into three


categories:
12/5/2024 • privileged instructions, 35
CPU Virtualization

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
12/5/2024
operations over the virtual memory. 36
CPU Virtualization
A CPU architecture is virtualizable if it supports
• The ability to run the VM’s privileged and,
• Unprivileged instructions in the CPU’s user
mode while the VMM runs in supervisor mode.

When the privileged instructions including control


and behavior-sensitive instructions of a VM are
executed, they are trapped in the VMM.

In this case, the VMM acts as a unified mediator


for hardware access from different VMs to
guarantee the correctness and stability of the
12/5/2024 whole system. 37
CPU Virtualization

However, not all CPU architectures are


virtualizable.

RISC CPU architectures can be naturally


virtualized because all control and behavior-
sensitive instructions are privileged instructions.

On the contrary, x86 CPU architectures are not


primarily designed to support virtualization.
12/5/2024 38
Memory Virtualization

Virtual memory virtualization is similar to the


virtual memory provided by modern OS.

In a traditional execution environment, the OS


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 MMU and a TLB


to optimize virtual memory performance.
12/5/2024 39
Memory Virtualization

However, in a virtual execution environment,


virtual memory virtualization involves sharing
the physical 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.
12/5/2024 40
Memory Virtualization

12/5/2024 41
I/O Virtualization

I/O virtualization involves managing the routing of


I/O requests between virtual

devices and the shared physical hardware.

There are three ways to implement I/O


virtualization: full device emulation, para-
virtualization, and direct I/O.
I/O virtualization. Generally, this approach
emulates well-known, real-world devices.
All the functions of a device or bus infrastructure,
such as device enumeration, identification,
12/5/2024 interrupts, and DMA, are replicated in software. 42
This software is located in the VMM and acts as
I/O Virtualization

The para-virtualization method of I/O virtualization is


typically used in Xen.

It is also known as the split driver model consisting of


a frontend driver and a backend driver.

It achieves beer device performance than full device


emulation, it comes with a higher CPU overhead

Direct I/O virtualization lets the VM access devices


directly.

It can achieve close-to native performance without


12/5/2024 43
high CPU costs.
I/O Virtualization

The full device emulation approach

12/5/2024 44
Thank you!

12/5/2024 45

You might also like