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

Virtualization Structures

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

Virtualization Structures

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 73

Virtualization Structures/Tools and Mechanisms

• In general, there are three typical classes of VM architecture.


• Figure on slide 7 showed 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. In such a case, the virtualization layer is responsible for converting portions of the real
hardware into virtual hardware.
• Therefore, different operating systems 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). They both perform the
same virtualization operations.

01/12/2024 1
Hypervisor
• A hypervisor is a hardware virtualization technique allowing multiple operating systems, called
guests to run on a host machine. This is also called the Virtual Machine Monitor (VMM).
Type 1: bare metal hypervisor
• sits on the bare metal computer hardware like the CPU, memory, etc.
• All guest operating systems are a layer above the hypervisor.
• The original CP/CMS hypervisor developed by IBM was of this kind.
Type 2: hosted hypervisor
• Run over a host operating system.
• Hypervisor is the second layer over the hardware.
• Guest operating systems run a layer over the hypervisor.
• The OS is usually unaware of the virtualization
01/12/2024 2
Full Binary Translation and Host-based Virtualization
• Depending on implementation technologies, hardware virtualization
VM architectures can be classified into two categories:
• Full virtualization and
• Host-based virtualization.

• Full virtualization does not need to modify the host OS. It relies on
binary translation to trap and to virtualize the execution of certain
sensitive, non virtualizable instructions.
• In a host-based system, both a host OS and a guest OS are used. A
virtualization software layer is built between the host OS and guest OS.
• These two classes of VM architecture are introduced next.

01/12/2024 3
Binary Translation of Guest OS Requests Using a VMM

• This approach was implemented by


VMware and many other software
companies.
• VMware puts the VMM at Ring 0 and the
guest OS at Ring 1. The VMM scans the
instruction stream and identified the
privileged, control- and behavior sensitive
instructions.
• When these instructions are identified, they
are trapped into the VMM, which emulates
the behavior of these instructions.
• The method used in this emulation is called
binary translation. Therefore, full
virtualization combines binary translation
and direct execution.
01/12/2024 5
Host-Based Virtualization
• An alternative VM architecture is to install a virtualization layer on
top of the host OS. This host OS is still responsible for managing the
hardware.
• This host-based architecture has some distinct advantages. First, the
user can install this VM architecture without modifying the host OS.
The virtualizing software can rely on the host OS to provide device
drivers and other low-level services. This will simplify the VM design
and ease its deployment.
• Second, the host-based approach appeals to many host machine
configurations. Compared to the hypervisor/VMM architecture, the
performance of the host-based architecture may also be low.

01/12/2024 6
Para-virtualization
• Para-virtualization needs to
modify the guest operating
systems.
• A para-virtualized VM provides
special APIs requiring substantial
OS modifications in user
applications.
• Performance degradation is a
critical issue of a virtualized
system.

01/12/2024 7
Full Virtualization vs. Para-Virtualization
Full virtualization
• Does not need to modify guest OS, and critical instructions are emulated by software
through the use of binary translation.
• VMware Workstation applies full virtualization, which uses binary translation to
automatically modify x86 software on-the-fly to replace critical instructions.
Advantage: no need to modify OS.
Disadvantage: binary translation slows down the performance.
Para virtualization
• Reduces the overhead, but cost of maintaining a paravirtualized OS is high.
• The improvement depends on the workload.
• Para virtualization must modify guest OS, non-virtualizable instructions are replaced by
hyper calls that communicate directly with the hypervisor or VMM.
• Para virtualization is supported by Xen, Denali and VMware ESX.
01/12/2024 8
The XEN Architecture
• Xen is an open source hypervisor
program developed by
Cambridge University. Xen is a
micro-kernel hypervisor, which
separates the policy from the
mechanism.
• Xen does not include any device
drivers natively . It just provides
a mechanism by which a guest
OS can have direct access to the
physical devices.
• As a result, the size of the Xen
hypervisor is kept rather small.
Xen provides a virtual
environment located between
the hardware and the OS.

01/12/2024 9
Virtualization of CPU, Memory, and I/O Devices
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.
• The critical instructions are divided into three categories: privileged instructions, control–sensitive
instructions, and behavior-sensitive instructions.
• 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.

01/12/2024 10
• 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. However, not all CPU architectures are virtualizable.
• RI SC 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.
01/12/2024 11
Memory Virtualization
• Virtual memory virtualization is similar to the virtual memory support provided by
modern operating systems. I n a traditional execution environment, the operating
system maintains mappings of virtual memory to ma chine memory using page
tables, which is a one-stage mapping from virtual memory to machine memory.
• However, in a virtual execution environment, virtual memory virtualization involves
sharing the physical system 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.

01/12/2024 12
I/O Virtualization
• 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, and DMA, are replicated in software.
This software is located in the VMM and acts as a virtual device.
• 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 high CPU costs.

01/12/2024 13
Diskless Beowulf Cluster - PelicanHPC
• PelicanHPC is a rapid (around 5 minutes, when you know what you're
doing) means of setting up a high performance computing (HPC) cluster
for parallel computing using MPI.
• We will see what PelicanHPC does, how to use the released CD images to
set up a HPC cluster, and some basic examples of usage.

01/12/2024 14
01/12/2024 15
PelicanHPC Installation
• PelicanHPC is a distribution of GNU/Linux that runs as a "live CD" (or
as a virtualization appliance).
• If the ISO image file is burnt to a CD/Flash Disk, the resulting CD/Flash
Disk can be used to boot a computer.
• The computer on which PelicanHPC is booted is referred to as the
"frontend node", which is the computer that the user interacts with.

01/12/2024 16
• Runing
Once PelicanHPC the PelicanHPC
is running, Cluster
a script ­ "pelican_setup" ­may be run. This
script configures the frontend node as a netboot server.
• After this has been done, other computers can boot copies of PelicanHPC
over the network.
• These other computers are referred to as "compute nodes".
• PelicanHPC configures the cluster made up of the frontend node and the
compute nodes so that MPI­based parallel computing may be done.

01/12/2024 17
PelicanHPC Advantages
• A "live CD" such as PelicanHPC does not use the hard disk of any of
the nodes, so it will not destroy or alter your installed operating
system.
• When the PelicanHPC cluster is shut down, all of the computers are in
their original state, and will boot back into whatever operating system
is installed.

01/12/2024 18
Virtualization Structures/Tools and Mechanisms
• In general, there are three typical classes of VM architecture.
• Figure on slide 7 showed 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. In such a case, the virtualization layer is responsible for converting portions of the real
hardware into virtual hardware.
• Therefore, different operating systems 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). They both perform the
same virtualization operations.

01/12/2024 20
Hypervisor
• A hypervisor is a hardware virtualization technique allowing multiple operating systems, called
guests to run on a host machine. This is also called the Virtual Machine Monitor (VMM).
Type 1: bare metal hypervisor
• sits on the bare metal computer hardware like the CPU, memory, etc.
• All guest operating systems are a layer above the hypervisor.
• The original CP/CMS hypervisor developed by IBM was of this kind.
Type 2: hosted hypervisor
• Run over a host operating system.
• Hypervisor is the second layer over the hardware.
• Guest operating systems run a layer over the hypervisor.
• The OS is usually unaware of the virtualization
01/12/2024 21
Full Binary Translation and Host-based Virtualization
• Depending on implementation technologies, hardware virtualization
VM architectures can be classified into two categories:
• Full virtualization and
• Host-based virtualization.

• Full virtualization does not need to modify the host OS. It relies on
binary translation to trap and to virtualize the execution of certain
sensitive, non virtualizable instructions.
• In a host-based system, both a host OS and a guest OS are used. A
virtualization software layer is built between the host OS and guest OS.
• These two classes of VM architecture are introduced next.

01/12/2024 22
Binary Translation of Guest OS Requests Using a VMM

• This approach was implemented by


VMware and many other software
companies.
• VMware puts the VMM at Ring 0 and the
guest OS at Ring 1. The VMM scans the
instruction stream and identified the
privileged, control- and behavior sensitive
instructions.
• When these instructions are identified, they
are trapped into the VMM, which emulates
the behavior of these instructions.
• The method used in this emulation is called
binary translation. Therefore, full
virtualization combines binary translation
and direct execution.
01/12/2024 23
Host-Based Virtualization
• An alternative VM architecture is to install a virtualization layer on
top of the host OS. This host OS is still responsible for managing the
hardware.
• This host-based architecture has some distinct advantages. First, the
user can install this VM architecture without modifying the host OS.
The virtualizing software can rely on the host OS to provide device
drivers and other low-level services. This will simplify the VM design
and ease its deployment.
• Second, the host-based approach appeals to many host machine
configurations. Compared to the hypervisor/VMM architecture, the
performance of the host-based architecture may also be low.

01/12/2024 24
Para-virtualization
• Para-virtualization needs to
modify the guest operating
systems.
• A para-virtualized VM provides
special APIs requiring substantial
OS modifications in user
applications.
• Performance degradation is a
critical issue of a virtualized
system.

01/12/2024 25
Full Virtualization vs. Para-Virtualization
Full virtualization
• Does not need to modify guest OS, and critical instructions are emulated by software
through the use of binary translation.
• VMware Workstation applies full virtualization, which uses binary translation to
automatically modify x86 software on-the-fly to replace critical instructions.
Advantage: no need to modify OS.
Disadvantage: binary translation slows down the performance.
Para virtualization
• Reduces the overhead, but cost of maintaining a paravirtualized OS is high.
• The improvement depends on the workload.
• Para virtualization must modify guest OS, non-virtualizable instructions are replaced by
hyper calls that communicate directly with the hypervisor or VMM.
• Para virtualization is supported by Xen, Denali and VMware ESX.
01/12/2024 26
The XEN Architecture
• Xen is an open source hypervisor
program developed by
Cambridge University. Xen is a
micro-kernel hypervisor, which
separates the policy from the
mechanism.
• Xen does not include any device
drivers natively . It just provides
a mechanism by which a guest
OS can have direct access to the
physical devices.
• As a result, the size of the Xen
hypervisor is kept rather small.
Xen provides a virtual
environment located between
the hardware and the OS.

01/12/2024 27
Virtualization of CPU, Memory, and I/O Devices
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.
• The critical instructions are divided into three categories: privileged instructions, control–sensitive
instructions, and behavior-sensitive instructions.
• 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.

01/12/2024 28
• 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. However, not all CPU architectures are virtualizable.
• RI SC 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.
01/12/2024 29
Memory Virtualization
• Virtual memory virtualization is similar to the virtual memory support provided by
modern operating systems. I n a traditional execution environment, the operating
system maintains mappings of virtual memory to ma chine memory using page
tables, which is a one-stage mapping from virtual memory to machine memory.
• However, in a virtual execution environment, virtual memory virtualization involves
sharing the physical system 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.

01/12/2024 30
I/O Virtualization
• 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, and DMA, are replicated in software.
This software is located in the VMM and acts as a virtual device.
• 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 high CPU costs.

01/12/2024 31
Diskless Beowulf Cluster - PelicanHPC
• PelicanHPC is a rapid (around 5 minutes, when you know what you're
doing) means of setting up a high performance computing (HPC) cluster
for parallel computing using MPI.
• We will see what PelicanHPC does, how to use the released CD images to
set up a HPC cluster, and some basic examples of usage.

01/12/2024 32
01/12/2024 33
PelicanHPC Installation
• PelicanHPC is a distribution of GNU/Linux that runs as a "live CD" (or
as a virtualization appliance).
• If the ISO image file is burnt to a CD/Flash Disk, the resulting CD/Flash
Disk can be used to boot a computer.
• The computer on which PelicanHPC is booted is referred to as the
"frontend node", which is the computer that the user interacts with.

01/12/2024 34
• Runing
Once PelicanHPC the PelicanHPC
is running, Cluster
a script ­ "pelican_setup" ­may be run. This
script configures the frontend node as a netboot server.
• After this has been done, other computers can boot copies of PelicanHPC
over the network.
• These other computers are referred to as "compute nodes".
• PelicanHPC configures the cluster made up of the frontend node and the
compute nodes so that MPI­based parallel computing may be done.

01/12/2024 35
PelicanHPC Advantages
• A "live CD" such as PelicanHPC does not use the hard disk of any of
the nodes, so it will not destroy or alter your installed operating
system.
• When the PelicanHPC cluster is shut down, all of the computers are in
their original state, and will boot back into whatever operating system
is installed.

01/12/2024 36
Virtualization Structures/Tools and Mechanisms
• In general, there are three typical classes of VM architecture.
• Figure on slide 7 showed 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. In such a case, the virtualization layer is responsible for converting portions of the real
hardware into virtual hardware.
• Therefore, different operating systems 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). They both perform the
same virtualization operations.

01/12/2024 38
Hypervisor
• A hypervisor is a hardware virtualization technique allowing multiple operating systems, called
guests to run on a host machine. This is also called the Virtual Machine Monitor (VMM).
Type 1: bare metal hypervisor
• sits on the bare metal computer hardware like the CPU, memory, etc.
• All guest operating systems are a layer above the hypervisor.
• The original CP/CMS hypervisor developed by IBM was of this kind.
Type 2: hosted hypervisor
• Run over a host operating system.
• Hypervisor is the second layer over the hardware.
• Guest operating systems run a layer over the hypervisor.
• The OS is usually unaware of the virtualization
01/12/2024 39
Full Binary Translation and Host-based Virtualization
• Depending on implementation technologies, hardware virtualization
VM architectures can be classified into two categories:
• Full virtualization and
• Host-based virtualization.

• Full virtualization does not need to modify the host OS. It relies on
binary translation to trap and to virtualize the execution of certain
sensitive, non virtualizable instructions.
• In a host-based system, both a host OS and a guest OS are used. A
virtualization software layer is built between the host OS and guest OS.
• These two classes of VM architecture are introduced next.

01/12/2024 40
Binary Translation of Guest OS Requests Using a VMM

• This approach was implemented by


VMware and many other software
companies.
• VMware puts the VMM at Ring 0 and the
guest OS at Ring 1. The VMM scans the
instruction stream and identified the
privileged, control- and behavior sensitive
instructions.
• When these instructions are identified, they
are trapped into the VMM, which emulates
the behavior of these instructions.
• The method used in this emulation is called
binary translation. Therefore, full
virtualization combines binary translation
and direct execution.
01/12/2024 41
Host-Based Virtualization
• An alternative VM architecture is to install a virtualization layer on
top of the host OS. This host OS is still responsible for managing the
hardware.
• This host-based architecture has some distinct advantages. First, the
user can install this VM architecture without modifying the host OS.
The virtualizing software can rely on the host OS to provide device
drivers and other low-level services. This will simplify the VM design
and ease its deployment.
• Second, the host-based approach appeals to many host machine
configurations. Compared to the hypervisor/VMM architecture, the
performance of the host-based architecture may also be low.

01/12/2024 42
Para-virtualization
• Para-virtualization needs to
modify the guest operating
systems.
• A para-virtualized VM provides
special APIs requiring substantial
OS modifications in user
applications.
• Performance degradation is a
critical issue of a virtualized
system.

01/12/2024 43
Full Virtualization vs. Para-Virtualization
Full virtualization
• Does not need to modify guest OS, and critical instructions are emulated by software
through the use of binary translation.
• VMware Workstation applies full virtualization, which uses binary translation to
automatically modify x86 software on-the-fly to replace critical instructions.
Advantage: no need to modify OS.
Disadvantage: binary translation slows down the performance.
Para virtualization
• Reduces the overhead, but cost of maintaining a paravirtualized OS is high.
• The improvement depends on the workload.
• Para virtualization must modify guest OS, non-virtualizable instructions are replaced by
hyper calls that communicate directly with the hypervisor or VMM.
• Para virtualization is supported by Xen, Denali and VMware ESX.
01/12/2024 44
The XEN Architecture
• Xen is an open source hypervisor
program developed by
Cambridge University. Xen is a
micro-kernel hypervisor, which
separates the policy from the
mechanism.
• Xen does not include any device
drivers natively . It just provides
a mechanism by which a guest
OS can have direct access to the
physical devices.
• As a result, the size of the Xen
hypervisor is kept rather small.
Xen provides a virtual
environment located between
the hardware and the OS.

01/12/2024 45
Virtualization of CPU, Memory, and I/O Devices
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.
• The critical instructions are divided into three categories: privileged instructions, control–sensitive
instructions, and behavior-sensitive instructions.
• 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.

01/12/2024 46
• 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. However, not all CPU architectures are virtualizable.
• RI SC 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.
01/12/2024 47
Memory Virtualization
• Virtual memory virtualization is similar to the virtual memory support provided by
modern operating systems. I n a traditional execution environment, the operating
system maintains mappings of virtual memory to ma chine memory using page
tables, which is a one-stage mapping from virtual memory to machine memory.
• However, in a virtual execution environment, virtual memory virtualization involves
sharing the physical system 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.

01/12/2024 48
I/O Virtualization
• 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, and DMA, are replicated in software.
This software is located in the VMM and acts as a virtual device.
• 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 high CPU costs.

01/12/2024 49
Diskless Beowulf Cluster - PelicanHPC
• PelicanHPC is a rapid (around 5 minutes, when you know what you're
doing) means of setting up a high performance computing (HPC) cluster
for parallel computing using MPI.
• We will see what PelicanHPC does, how to use the released CD images to
set up a HPC cluster, and some basic examples of usage.

01/12/2024 50
01/12/2024 51
PelicanHPC Installation
• PelicanHPC is a distribution of GNU/Linux that runs as a "live CD" (or
as a virtualization appliance).
• If the ISO image file is burnt to a CD/Flash Disk, the resulting CD/Flash
Disk can be used to boot a computer.
• The computer on which PelicanHPC is booted is referred to as the
"frontend node", which is the computer that the user interacts with.

01/12/2024 52
• Runing
Once PelicanHPC the PelicanHPC
is running, Cluster
a script ­ "pelican_setup" ­may be run. This
script configures the frontend node as a netboot server.
• After this has been done, other computers can boot copies of PelicanHPC
over the network.
• These other computers are referred to as "compute nodes".
• PelicanHPC configures the cluster made up of the frontend node and the
compute nodes so that MPI­based parallel computing may be done.

01/12/2024 53
PelicanHPC Advantages
• A "live CD" such as PelicanHPC does not use the hard disk of any of
the nodes, so it will not destroy or alter your installed operating
system.
• When the PelicanHPC cluster is shut down, all of the computers are in
their original state, and will boot back into whatever operating system
is installed.

01/12/2024 54
Virtualization Structures/Tools and Mechanisms
• In general, there are three typical classes of VM architecture.
• Figure on slide 7 showed 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. In such a case, the virtualization layer is responsible for converting portions of the real
hardware into virtual hardware.
• Therefore, different operating systems 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). They both perform the
same virtualization operations.

01/12/2024 56
Hypervisor
• A hypervisor is a hardware virtualization technique allowing multiple operating systems, called
guests to run on a host machine. This is also called the Virtual Machine Monitor (VMM).
Type 1: bare metal hypervisor
• sits on the bare metal computer hardware like the CPU, memory, etc.
• All guest operating systems are a layer above the hypervisor.
• The original CP/CMS hypervisor developed by IBM was of this kind.
Type 2: hosted hypervisor
• Run over a host operating system.
• Hypervisor is the second layer over the hardware.
• Guest operating systems run a layer over the hypervisor.
• The OS is usually unaware of the virtualization
01/12/2024 57
Full Binary Translation and Host-based Virtualization
• Depending on implementation technologies, hardware virtualization
VM architectures can be classified into two categories:
• Full virtualization and
• Host-based virtualization.

• Full virtualization does not need to modify the host OS. It relies on
binary translation to trap and to virtualize the execution of certain
sensitive, non virtualizable instructions.
• In a host-based system, both a host OS and a guest OS are used. A
virtualization software layer is built between the host OS and guest OS.
• These two classes of VM architecture are introduced next.

01/12/2024 58
Binary Translation of Guest OS Requests Using a VMM

• This approach was implemented by


VMware and many other software
companies.
• VMware puts the VMM at Ring 0 and the
guest OS at Ring 1. The VMM scans the
instruction stream and identified the
privileged, control- and behavior sensitive
instructions.
• When these instructions are identified, they
are trapped into the VMM, which emulates
the behavior of these instructions.
• The method used in this emulation is called
binary translation. Therefore, full
virtualization combines binary translation
and direct execution.
01/12/2024 59
Host-Based Virtualization
• An alternative VM architecture is to install a virtualization layer on
top of the host OS. This host OS is still responsible for managing the
hardware.
• This host-based architecture has some distinct advantages. First, the
user can install this VM architecture without modifying the host OS.
The virtualizing software can rely on the host OS to provide device
drivers and other low-level services. This will simplify the VM design
and ease its deployment.
• Second, the host-based approach appeals to many host machine
configurations. Compared to the hypervisor/VMM architecture, the
performance of the host-based architecture may also be low.

01/12/2024 60
Para-virtualization
• Para-virtualization needs to
modify the guest operating
systems.
• A para-virtualized VM provides
special APIs requiring substantial
OS modifications in user
applications.
• Performance degradation is a
critical issue of a virtualized
system.

01/12/2024 61
Full Virtualization vs. Para-Virtualization
Full virtualization
• Does not need to modify guest OS, and critical instructions are emulated by software
through the use of binary translation.
• VMware Workstation applies full virtualization, which uses binary translation to
automatically modify x86 software on-the-fly to replace critical instructions.
Advantage: no need to modify OS.
Disadvantage: binary translation slows down the performance.
Para virtualization
• Reduces the overhead, but cost of maintaining a paravirtualized OS is high.
• The improvement depends on the workload.
• Para virtualization must modify guest OS, non-virtualizable instructions are replaced by
hyper calls that communicate directly with the hypervisor or VMM.
• Para virtualization is supported by Xen, Denali and VMware ESX.
01/12/2024 62
The XEN Architecture
• Xen is an open source hypervisor
program developed by
Cambridge University. Xen is a
micro-kernel hypervisor, which
separates the policy from the
mechanism.
• Xen does not include any device
drivers natively . It just provides
a mechanism by which a guest
OS can have direct access to the
physical devices.
• As a result, the size of the Xen
hypervisor is kept rather small.
Xen provides a virtual
environment located between
the hardware and the OS.

01/12/2024 63
Virtualization of CPU, Memory, and I/O Devices
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.
• The critical instructions are divided into three categories: privileged instructions, control–sensitive
instructions, and behavior-sensitive instructions.
• 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.

01/12/2024 64
• 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. However, not all CPU architectures are virtualizable.
• RI SC 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.
01/12/2024 65
Memory Virtualization
• Virtual memory virtualization is similar to the virtual memory support provided by
modern operating systems. I n a traditional execution environment, the operating
system maintains mappings of virtual memory to ma chine memory using page
tables, which is a one-stage mapping from virtual memory to machine memory.
• However, in a virtual execution environment, virtual memory virtualization involves
sharing the physical system 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.

01/12/2024 66
I/O Virtualization
• 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, and DMA, are replicated in software.
This software is located in the VMM and acts as a virtual device.
• 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 high CPU costs.

01/12/2024 67
Diskless Beowulf Cluster - PelicanHPC
• PelicanHPC is a rapid (around 5 minutes, when you know what you're
doing) means of setting up a high performance computing (HPC) cluster
for parallel computing using MPI.
• We will see what PelicanHPC does, how to use the released CD images to
set up a HPC cluster, and some basic examples of usage.

01/12/2024 68
01/12/2024 69
PelicanHPC Installation
• PelicanHPC is a distribution of GNU/Linux that runs as a "live CD" (or
as a virtualization appliance).
• If the ISO image file is burnt to a CD/Flash Disk, the resulting CD/Flash
Disk can be used to boot a computer.
• The computer on which PelicanHPC is booted is referred to as the
"frontend node", which is the computer that the user interacts with.

01/12/2024 70
• Runing
Once PelicanHPC the PelicanHPC
is running, Cluster
a script ­ "pelican_setup" ­may be run. This
script configures the frontend node as a netboot server.
• After this has been done, other computers can boot copies of PelicanHPC
over the network.
• These other computers are referred to as "compute nodes".
• PelicanHPC configures the cluster made up of the frontend node and the
compute nodes so that MPI­based parallel computing may be done.

01/12/2024 71
PelicanHPC Advantages
• A "live CD" such as PelicanHPC does not use the hard disk of any of
the nodes, so it will not destroy or alter your installed operating
system.
• When the PelicanHPC cluster is shut down, all of the computers are in
their original state, and will boot back into whatever operating system
is installed.

01/12/2024 72

You might also like