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

ch 2 cloud computing

Uploaded by

yallbethel5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

ch 2 cloud computing

Uploaded by

yallbethel5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
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/6/2024 1
Outline

12/6/2024 2
Introduction

• It is a software like a physical computer that


can run an OSs and applications.
V i r t u a l • Each virtual machine contains its own
machine virtual hardware
• 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 saving techniques
used by cloud providers
12/6/2024 3
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/6/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.
• A partition is the logical division of a
12/6/2024
hard disk drive (e.g. C:, D:, E: etc.) 5
Traditional Vs. Virtual Server Model

Traditional Server Model Virtual Server Model

12/6/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 power
Generally consumption
• Using less space and power is more
12/6/2024
environmentally friendly and reduces costs. 7
Benefits of Virtualization M o r e
flexible and
eEfnf hi caine cn et
adevelopmen
l l o c a t i o nI t l o w e r s
t resources.
of the cost of
productivity.
R e m oI t e T
access and infrastructu
r a p re. i d
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/6/2024 8
Types of Virtualization
Hardware
Virtualizati
Operating
ons y s t e m
Application
Virtualizati
Virtualizati
N eon
twork
on
Virtualizati
on Desktop
Virtualizati
Storage
on Virtualizati
Server Virtualization on

Data Virtualization

12/6/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 server.
12/6/2024 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/6/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 physical
machine.
12/6/2024 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 within days or
12/6/2024 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.
M a i n be n e f i t s U s e r m o bi l i t y ,
Portability, Easy management of
software installation, updates, and
12/6/2024 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/6/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 ,
Reduce infrastructural cost etc.
12/6/2024 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 i nf o r m a t i o n l i k e ho w d a t a i s
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/6/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/6/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 layers to run,
Itnow
can capable
also be modified to run
of running on the
on the x86
x64 machine. For the basic emulation,
machines.
an interpreter is needed, which
interprets the source code and then
12/6/2024
converts it into a hardware format that 19
can be read.
Hardware Abstraction Level (HAL)
HAL enables virtualization to operate at the hardwa
level.
VM manages the HW using the virtualization process.
Virtualization HW components such as I/O device, t
memory, the processor, etc.
Utilization rate is improved by having multiple concurre
users.
This is mostly used in the cloud based infrastructure.
Example: Xen/VMware
12/6/2024 20
OS Level Virtualization
Create an abstraction layer between traditional OS a
user applications.
Also known as Containers.
An isolated containers are created on single physic
server
The containers function like actual servers

Examples: Jail, Virtual environment

12/6/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/6/2024 22
Application Level Virtualization
API hooks are used
to control the
Applications utilize
communication
the user-level APIs
between application
Examples WINE / vCUDA from the libraries
and the rest of the
when the operating
system.
system is
What is API?
unmanageable.
• A P I s •t aSince
n d s API
for
A p p l i interfaces
c a t i o n are
P r o g r agood
m m icandidates
ng
Interface.for virtualization.
12/6/2024
• Interface can be 23
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 hardware.
After virtualization, a virtualization layer is inserted between the
hardware and the operating system. The virtualization
layer is responsible for
converting portions of
the real hardware into
12/6/2024
virtual hardware. 24
Virtualization Structures /Tools and Mechanism

12/6/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/6/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 of
12/6/2024 hypervisors 27
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 Hostedany base server operating
Hypervisor
• system
Run over a host operating system
•• It
It has direct
is the access
second layertoover
hardware resources.
the hardware
• Guest OS run a layer over the hypervisor.
12/6/2024
• The OS is usually unaware of the virtualization 28
12/6/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 to
virtualize
The the execution
guest OSes and their of certain sensitive,
applications consist
ofnon virtualizable
noncritical instructions.
and critical instructions.

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

12/6/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 without
Disadvantages
modifying the host
• P erformance is
OS.
low to be useful in
• Flexible
practice. When an
application
requests hardware
12/6/2024 32
access, it involves
Para-virtualization

It needs to
VM provides
modify the
special APIs
guest OS
t o O S
modification
sPerformance
in user
applications.
degradation
is a critical
issue

12/6/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
applications are trapped in the VMM.
To save processor states, mode switching is completed
by hardware.

For x86 architecture, Intel and AMD have proprietary


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


• privileged instructions,
12/6/2024
• control–sensitive instructions, and 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 operations
over the virtual memory.
12/6/2024 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 whole system.
12/6/2024 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/6/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/6/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/6/2024 40
Memory Virtualization

12/6/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, interrupts,
12/6/2024 and DMA, are replicated in software. This software 42 is
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/6/2024 high CPU costs. 43
I/O Virtualization

The full device emulation approach


12/6/2024 44
Thank you!

12/6/2024 45

You might also like