Virtualization Technologies in Distributed Operating Systems, Study notes of Computer science

Various types of virtualization, including emulation, full/native, para-virtualization, OS-level, and application-level virtualization. It also covers Type 1 and Type 2 hypervisors, memory and I/O virtualization, and server design issues. motivation, migration models, and resource migration actions.

Typology: Study notes

2021/2022

Uploaded on 09/12/2022

alannis
alannis 🇺🇸

4.7

(13)

263 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
CS677: Distributed OS
Computer Science Lecture 5, page 1
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,…
CS677: Distributed OS
Computer Science Lecture 5, page 2
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
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Virtualization Technologies in Distributed Operating Systems and more Study notes Computer science in PDF only on Docsity!

Computer Science CS677: Distributed OS Lecture 5, page^1

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,… Computer Science CS677: Distributed OS Lecture 5, page^2

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

Computer Science CS677: Distributed OS Lecture 5, page^3

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 Computer Science CS677: Distributed OS Lecture 5, page^4

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.

Computer Science CS677: Distributed OS Lecture 5, page^7

Memory virtualization

  • OS manages page tables
    • Create new pagetable is sensitive -> traps to hypervisor
  • hypervisor manages multiple OS
    • Need a second shadow page table
    • OS: VM virtual pages to VM’s physical pages
    • Hypervisor maps to actual page in shadow page table
    • Two level mapping
    • Need to catch changes to page table (not privileged)
      • Change PT to read-only - page fault
      • Paravirtualized - use hypercalls to inform Computer Science CS677: Distributed OS Lecture 5, page^8

I/O Virtualization

  • Virtualize I/O devices:
    • Network interface card, disk
  • Create virtual interfaces that are multiplexed onto a

physical interface

  • Network: multiple virtual NICs multiplexed onto a physical Nic
  • Disk: each VM has its own partition; hypervisor translates I/O requests to actual disk blocks
  • Type 2 hypervisor: use host OS device drivers
  • Type 1: implement drivers or use a special VM (dom-0)

Computer Science CS677: Distributed OS Lecture 5, page^9

Server Design Issues

  • Server Design
    • Iterative versus concurrent
  • How to locate an end-point (port #)?
    • Well known port #
    • Directory service (port mapper in Unix)
    • Super server (inetd in Unix) Computer Science CS677: Distributed OS Lecture 5, page^10

Stateful or Stateless?

  • Stateful server
    • Maintain state of connected clients
    • Sessions in web servers
  • Stateless server
    • No state for clients
  • Soft state
    • Maintain state for a limited time; discarding state does not impact correctness

Computer Science CS677: Distributed OS Lecture 5, page^13

Code and Process Migration

  • Motivation
  • How does migration occur?
  • Resource migration
  • Agent-based system
  • Details of process migration Computer Science CS677: Distributed OS Lecture 5, page^14

Motivation

  • Key reasons: performance and flexibility
  • Process migration (aka strong mobility )
    • Improved system-wide performance – better utilization of system-wide resources
    • Examples: Condor, DQS
  • Code migration (aka weak mobility)
    • Shipment of server code to client – filling forms (reduce communication, no need to pre-link stubs with client)
    • Ship parts of client application to server instead of data from server to client (e.g., databases)
    • Improve parallelism – agent-based web searches

Computer Science CS677: Distributed OS Lecture 5, page^15

Motivation

  • Flexibility
    • Dynamic configuration of distributed system
    • Clients don’t need preinstalled software – download on demand Computer Science CS677: Distributed OS Lecture 5, page^16

Migration models

  • Process = code seg + resource seg + execution seg
  • Weak versus strong mobility
    • Weak => transferred program starts from initial state
  • Sender-initiated versus receiver-initiated
  • Sender-initiated (code is with sender)
    • Client sending a query to database server
    • Client should be pre-registered
  • Receiver-initiated
    • Java applets
    • Receiver can be anonymous

Computer Science CS677: Distributed OS Lecture 5, page^19

Do Resources Migrate?

  • Depends on resource to process binding
    • By identifier: specific web site, ftp server
    • By value: Java libraries
    • By type: printers, local devices
  • Depends on type of “attachments”
    • Unattached to any node: data files
    • Fastened resources (can be moved only at high cost)
      • Database, web sites
    • Fixed resources
      • Local devices, communication end points Computer Science CS677: Distributed OS Lecture 5, page^20

Resource Migration Actions

  • Actions to be taken with respect to the references to local resources when migrating code to another machine.
  • GR: establish global system-wide reference
  • MV: move the resources
  • CP: copy the resource
  • RB: rebind process to locally available resource GR GR RB (or GR) GR (or MV) GR (or CP) RB (or GR, CP) MV (or GR) CP ( or MV, GR) RB (or GR, CP) By identifier By value By type Unattached Fastened Fixed Resource-to machine binding Process-to- resource binding

Computer Science CS677: Distributed OS Lecture 5, page^21

Migration in Heterogeneous Systems

  • Systems can be heterogeneous (different architecture, OS)
    • Support only weak mobility: recompile code, no run time information
    • Strong mobility: recompile code segment, transfer execution segment [migration stack]
    • Virtual machines - interpret source (scripts) or intermediate code [Java] Computer Science CS677: Distributed OS Lecture 5, page^22

Case study: Agents/Worms

  • Software agents
    • Autonomous process capable of reacting to, and initiating changes in its environment, possibly in collaboration
    • More than a “process” – can act on its own
  • Mobile agent
    • Capability to move between machines
    • Needs support for strong mobility
    • Example: D’Agents (aka Agent TCL)
      • Support for heterogeneous systems, uses interpreted languages

Computer Science CS677: Distributed OS Lecture 5, page^25

Case Study: ISOS

  • Internet scale operating system
    • Harness compute cycles of thousands of PCs on the Internet
    • PCs owned by different individuals
    • Donate CPU cycles/storage when not in use (pool resouces)
    • Contact coordinator for work
    • Coodinator: partition large parallel app into small tasks
    • Assign compute/storage tasks to PCs
  • Examples: Seti@home, P2P backups