Chapter 2
Chapter 2
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
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
12/5/2024 6
Why Virtualization?
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
12/5/2024 11
Application Virtualization
12/5/2024 15
Server Virtualization
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.
12/5/2024 21
Library Level Virtualization
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
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.
12/5/2024 41
I/O Virtualization
12/5/2024 44
Thank you!
12/5/2024 45