Virtualization in Computer Science: Types, Hypervisors, and Applications, Lecture notes of Computer science

An overview of virtualization in Computer Science, discussing different types of virtualization such as emulation, full virtualization, para-virtualization, and application-level virtualization. The document also covers types of hypervisors, how virtualization works, and the use of virtualization in today's data centers and desktop computing. A case study of PlanetLab is also included.

Typology: Lecture notes

2021/2022

Uploaded on 09/12/2022

shafi
shafi 🇺🇸

3.9

(9)

221 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computer Science Lecture 4, page
CS677: Distributed OS
Virtualization
Virtualization: extend or replace an existing interface to
mimic the behavior of another system.
Introduced in 1970s: run legacy software on newer mainframe
hardware
Handle platform diversity by running apps in VMs
Portability and flexibility
17
Computer Science Lecture 4, page
CS677: Distributed OS
Types of Interfaces
Different types of interfaces
Assembly instructions
System calls
APIs
Depending on what is replaced /mimiced, we obtain
different forms of virtualization
18
pf3
pf4
pf5
pf8

Partial preview of the text

Download Virtualization in Computer Science: Types, Hypervisors, and Applications and more Lecture notes Computer science in PDF only on Docsity!

Computer Science CS677: Distributed OS Lecture 4, page

Virtualization

  • Virtualization: extend or replace an existing interface to

mimic the behavior of another system.

  • Introduced in 1970s: run legacy software on newer mainframe hardware
  • Handle platform diversity by running apps in VMs
  • Portability and flexibility 17

Types of Interfaces

  • Different types of interfaces
    • Assembly instructions
    • System calls
    • APIs
  • Depending on what is replaced /mimiced, we obtain

different forms of virtualization

18

Computer Science CS677: Distributed OS Lecture 4, page

Types of Virtualization

  • Emulation
    • VM emulates/simulates complete hardware
    • Unmodified guest OS for a different PC can be run
      • Bochs, VirtualPC for Mac, QEMU
  • Full/native Virtualization
    • VM simulates “enough” hardware to allow an unmodified guest OS to be run in isolation - Same hardware CPU
    • IBM VM family, VMWare Workstation, Parallels,… 19

Types of virtualization

  • Para-virtualization
    • VM does not simulate hardware
    • Use special API that a modified guest OS must use
    • Hypercalls trapped by the Hypervisor and serviced
    • Xen, VMWare ESX Server
  • OS-level virtualization
    • OS allows multiple secure virtual servers to be run
    • Guest OS is the same as the host OS, but appears isolated
      • apps see an isolated OS
    • Solaris Containers, BSD Jails, Linux Vserver
  • Application level virtualization
    • Application is gives its own copy of components that are not shared
      • (E.g., own registry files, global objects) - VE prevents conflicts
    • JVM, Rosetta on Mac (also emulation), WINE 20

Computer Science CS677: Distributed OS Lecture 4, page

Type 1 hypervisor

  • Unmodified OS is running in user mode (or ring 1)
    • But it thinks it is running in kernel mode ( virtual kernel mode)
    • privileged instructions trap; sensitive inst-> use VT to trap
    • Hypervisor is the “real kernel”
      • Upon trap, executes privileged operations
      • Or emulates what the hardware would do 23

Type 2 Hypervisor

  • VMWare example
    • Upon loading program: scans code for basic blocks
    • If sensitive instructions, replace by Vmware procedure
      • Binary translation
    • Cache modified basic block in VMWare cache
      • Execute; load next basic block etc.
  • Type 2 hypervisors work without VT support
    • Sensitive instructions replaced by procedures that emulate them. 24

Computer Science CS677: Distributed OS Lecture 4, page

Paravirtualization

  • Both type 1 and 2 hypervisors work on unmodified OS
  • Paravirtualization: modify OS kernel to replace all

sensitive instructions with hypercalls

  • OS behaves like a user program making system calls
  • Hypervisor executes the privileged operation invoked by hypercall. 25

Virtual machine Interface

  • Standardize the VM interface so kernel can run on bare

hardware or any hypervisor

26

Computer Science CS677: Distributed OS Lecture 4, page

Examples

  • Application-level virtualization: “process virtual

machine”

  • VMM /hypervisor 29 Computer Science Lecture 4, page

Virtual Appliances & Multi-Core

  • Virtual appliance: pre-configured VM with OS/ apps

pre-installed

  • Just download and run (no need to install/comfigure)
  • Software distribution using appliances
  • Multi-core CPUs
  • Run multiple VMs on multi-core systems
  • Each VM assigned one or more vCPU
  • Mapping from vCPUs to physical CPUs CS677: Distributed OS 30

Computer Science Lecture 4, page

Use of Virtualization Today

  • Data centers:
    • server consolidation: pack multiple virtual servers onto a smaller number of physical server - saves hardware costs, power and cooling costs
  • Cloud computing: rent virtual servers
    • cloud provider controls physical machines and mapping of virtual servers to physical hosts
    • User gets root access on virtual server
  • Desktop computing:
    • Multi-platform software development
    • Testing machines
    • Run apps from another platform 31

Case Study: PlanetLab

  • Distributed cluster across universities
    • Used for experimental research by students and faculty in networking and distributed systems
  • Uses a virtualized architecture
    • Linux Vservers
    • Node manager per machine
    • Obtain a “slice” for an experiment: slice creation service