You are on page 1of 29

CSE2005- Operating Systems

Reference Textbook: Operating System Concepts by Avi Silberschatz, Greg Gagne, and Peter Baer Galvin
1
Fall-Semester2021-2022 SCOPE
CSE2005- Operating Systems

Module 6
Virtualization

2
SCOPE
CSE2005- Operating System

Virtualization
Virtualization, in computing, refers to the act of creating a
virtual (rather than actual) version of something, including but not
limited to a virtual computer hardware platform, operating system
(OS), storage device, or computer network resources.

Virtualization is nothing but abstracting operating system,


application, storage or network away from the true underlying
hardware or software. It creates the illusion of physical hardware
to achieve the goal of operating system isolation.

The term "virtualization" traces its roots to 1960s


mainframes, during which it was a method of logically dividing
the mainframes' resources for different applications. Since then,
the meaning of the term has evolved to the aforementioned.
SCOPE
CSE2005- Operating System

Types of Virtualization
Server virtualization allows you to run multiple virtual machines
on a single physical server.

Desktop virtualization allows you to run multiple desktop


machines on a single physical server, and distribute them.

Application virtualization allows you to distribute multiple copies


of an application from a single physical server.

SCOPE
CSE2005- Operating System

Virtual Architecture

SCOPE
CSE2005- Operating System

Resource Optimization
Server virtualization allows you to run multiple virtual machines
on a single physical server.

SCOPE
CSE2005- Operating System

Advantages
Partitioning
— Run multiple operating systems on one physical machine
— Share physical resources between virtual machines
Portability
— Entire virtual machine is saved as a file,
— Move, copy, or export as easily as a file
Security
— Hardware is isolated from the operating system
— Recovery as easily as restoring a file
Agnostic
— Migrate a virtual machine between similar, or different, physical
servers
SCOPE
CSE2005- Operating System

Problem with Desktops


Resource management issues
— Order in bulk, homogony saves money
— Buy for the most demanding group of users, overkill for rest
— Satisfying end user experience
High end users
— Each one is custom
— Chained to desk
— Required GPU
IT operations staff to manage it all
— Security/Anti-virus/Updates/Patches
— Hardware issues
— Distributed/Geography
SCOPE
CSE2005- Operating System

Why Virtualization is required


Business demanded:
— Cost savings
— Flexibility
— Mobility
End users demanded:
— Frequent refresh
— More “power”
— Mobility
— BYOD
— Graphics

SCOPE
CSE2005- Operating System

Application Virtualization
Application virtualization allows distribution of multiple
copies of an application from a single physical server.
— Streamed to BYOD
— Centrally managed
— Ease of support
Typical solutions:
— Citrix Metaframe…Presentation Server…now XenApp
— VMware ThinApp
— Microsoft App-v

SCOPE
CSE2005- Operating System

Hypervisors
• A hypervisor is a crucial piece of software that makes virtualization
possible.
• It abstracts guest machines and the operating system they run on,
from the actual hardware.
• Hypervisors create a virtualization layer that separates CPU /
Processors, RAM and other physical resources from the virtual
machines you create.
• The machine we install a hypervisor on is called a host machine,
versus guest virtual machines that run on top of them.
• From a VM’s standpoint, there is no difference between the physical
and virtualized environment. Guest machines do not know that the
hypervisor created them in a virtual environment. Or that they are
sharing available computing power

SCOPE
CSE2005- Operating System

Types of Hypervisors

• Type 1 Hypervisor (also called bare metal or native)

• Type 2 Hypervisor (also known as hosted hypervisors)

SCOPE
CSE2005- Operating System

Type 1 Hypervisor
• A bare-metal hypervisor (Type 1) is a layer of software we install
directly on top of a physical server and its underlying hardware.
• There is no software or any operating system in between, hence the
name bare-metal hypervisor.
• A Type 1 hypervisor is proven in providing excellent performance
and stability since it does not run inside Windows or any other
operating system.
• Type 1 hypervisors are an OS themselves, a very basic one on top of
which you can run virtual machines.
• The physical machine the hypervisor is running on serves
virtualization purposes only. You cannot use it for anything else.
• Eg: Citrix Hypervisor (formerly known as Xen Server), Microsoft
Hyper-V, KVM (Kernel-Based Virtual Machine)

SCOPE
CSE2005- Operating System

Type 2 Hypervisor
• This type of hypervisor runs inside of an operating system of a
physical host machine.
• As opposed to type 1 hypervisors that run directly on the hardware,
hosted hypervisors have one software layer underneath.
• Type 2 Hypervisors are consists of
– A physical machine.
– An operating system installed on the hardware (Windows, Linux,
macOS).
– A type 2 hypervisor software within that operating system.
– The actual instances of guest virtual machines.

SCOPE
CSE2005- Operating System

SCOPE
CSE2005- Operating System

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 operating systems
independently.
• Server virtualization is a cost-effective way to provide web hosting
services and effectively utilize existing resources in IT infrastructure.
• Without server virtualization, servers only use a small part of their
processing power. This results in servers sitting idle because the
workload is distributed to only a portion of the network’s servers.
• Data centers become overcrowded with underutilized servers,
causing a waste of resources and power.

SCOPE
CSE2005- Operating System

Server Virtualization

SCOPE
CSE2005- Operating System

Full Virtualization
Virtual machine simulates hardware to allow an unmodified guest
OS to be run in isolation. There is two type of Full virtualizations
in the enterprise market. On both full virtualization types, guest
operating system’s source information will not be modified.
• Software assisted full virtualization
• Hardware-assisted full virtualization

SCOPE
CSE2005- Operating System

Software Assisted – Full Virtualization


(BT – Binary Translation )
It completely relies on binary translation to trap and virtualize the
execution of sensitive, non-virtualizable instructions sets. It
emulates the hardware using the software instruction sets. Due to
binary translation, it often criticized for performance issue. Here
is the list of software which will fall under software assisted
(BT).
• VMware workstation (32Bit guests)
• Virtual PC
• VirtualBox (32-bit guests)
• VMware Server

SCOPE
CSE2005- Operating System

Software Assisted – Full Virtualization


(BT – Binary Translation )

SCOPE
CSE2005- Operating System

Hardware-Assisted – Full Virtualization (VT)


Hardware-assisted full virtualization eliminates the binary translation
and it directly interrupts with hardware using the virtualization
technology which has been integrated on X86 processors since 2005
(Intel VT-x and AMD-V).
Guest OS’s instructions might allow a virtual context execute
privileged instructions directly on the processor, even though it is
virtualized.
Here is the list of enterprise software which supports hardware-assisted
– Full virtualization which falls under hypervisor type 1 (Bare metal )
VMware ESXi /ESX
KVM
Hyper-V
Xen

SCOPE
CSE2005- Operating System

Hardware-Assisted – Full Virtualization (VT)

SCOPE
CSE2005- Operating System

Para-Virtualization
• Paravirtualization doesn’t need to simulate the hardware for
the virtual machines.
• The hypervisor is installed on a physical server (host) and a
guest OS is installed into the environment.
• Virtual guests are aware that it has been virtualized, unlike the
full virtualization (where the guest doesn’t know that it has
been virtualized) to take advantage of the functions.
• In this virtualization method, guest source codes will be
modified with sensitive information to communicate with the
host.
• Guest Operating systems require extensions to make API calls
to the hypervisor.

SCOPE
CSE2005- Operating System

Para-Virtualization

SCOPE
CSE2005- Operating System

Para-Virtualization
Here is the list of products which supports paravirtualization.

• Xen
• IBM LPAR
• Oracle VM for SPARC (LDOM)
• Oracle VM for X86 (OVM)

SCOPE
CSE2005- Operating System

OS-Level Virtualization
• Unlike full and para-virtualization, OS-level visualization does
not use a hypervisor.
• The virtualization capability, which is part of the physical
server operating system, performs all the tasks of a hypervisor.
• However, all the virtual servers must run that same operating
system in this server virtualization method.

SCOPE
CSE2005- Operating System

Containers
• A container is a virtual runtime environment that runs on top of a
single operating system (OS) kernel and emulates an operating
system rather than the underlying hardware.
• A container engine is a managed environment for deploying
containerized applications. The container engine allocates cores and
memory to containers, enforces spatial isolation and security, and
provides scalability by enabling the addition of containers.
• They are isolated and secure.

SCOPE
CSE2005- Operating System

Containers

SCOPE
CSE2005- Operating System

Virtual Machine vs Containers


Virtual Machine Containers
Each VM has its own OS All containers share the same
kernel of the host
Boot up time is in minutes Containers initiate in seconds
VMs snapshots are used Usually, images are built in top of
occasionally others layer by layer format
Not version controlled Can be version controlled
Cannot run more than three VM’s Many containers can be created in
in an average laptop a single machine

SCOPE

You might also like