Operating-Systems-Notes

Virtualization

Virtualization allows concurrent execution of multiple OSs and their applications on the same physical machine.

virtualization.png

Defining Virtual Machine

A Virtual Machine is an efficient, isolated duplicate of the real machine.

VMM goals

Virtualization advantages

Two main Virtualization Models:

1. Bare-metal or Hypervisor based (Type 1)

hypervisor.png

1. Hosted (Type 2)

hosted.png

Virtualization requirements

Hardware protection levels

Commodity hardware has more than two protection levels

hwprotectionlevels

Process Virtualization (Trap-and-Emulate)

Problems with Trap-and-Emulate

Binary Translation

Goal : Full Virtualization i.e. guest OS is not modified

Approach : Dynamic Binary Translation

  1. Inspect code blocks to be executed
  2. If needed, translate to alternate instruction sequence
    • e.g. to emulate desired behaviour, possibly avoid traps
  3. Otherwise run at hardware speeds
    • cache translated blocks to ammortize translation costs

Paravirtualization

Goal : Performance; give up on modified guest OSs

Approach : Paravirtualization : modify guest OSs so that

Memory virtualization

Overheads eliminated or reduced on newer platforms

Device Virtualization

3 key models for Device Virtualization:

1. Pass through model

Approach: VMM-level-driver configures device access permissions

passthrough.png

Advantages

Disadvantages

2. Hypervisor - Direct model

Approach:

hypervisordirect.png

Advantages

Disadvantages

3. Split Device-Driver model

Approach:

splitdevicedriver.png

Advantages