Virtualization and DFS Flashcards

1
Q

What are the goals of a VMM?

A
  1. Fidelity - Provide identical environment to VM
  2. Performance - no difference in performance
  3. Safety/Isolation - VMM is in complete control of system resources
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some benefits of virtualization?

A
  1. Consolidation - can have multiple machines on one physical machine
  2. Easy to migrate or clone a machine
  3. Improved security (because of isolated virtual machine)
  4. Better debugging
  5. Support for legacy OSes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the types of virtualization models?

A

Bare-metal/hypervisor based (type 1) and hosted (type 2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a bare-metal / hypervisor based VM?

A

No OS, hypervisor runs directly on top of hardware. Usually runs a privileged VM which controls hardware

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is hosted virtualization?

A

VMM runs within/on top of OS, can run VM and native applications. Host owns hardware not VMM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Describe trap-and-emulate

A

When the processor executes guest instructions natively, but traps when a privilege instruction executes. The VMM then decides what to do - throw exception or emulate the instruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is binary translation?

A

In order to be able to run an unmodified binary, the VM is rewritten to not use privileged instructions that do not trap. While a binary is running, the VM checks it see if it is going to use one of those instructions and if so, replaces it with code that doesn’t use it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is paravirtualization?

A

Focused on performance, not running unmodified guest. Guest knows that it is virtualized and can make specific calls to the hypervisor to perform operations (hypercall)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the types of memory in virtualization?

A

Virtual (what programs see)
Physical (what VMs see)
Machine (the actual physical memory)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the two ways to virtualize memory when doing full virtualization?

A
  1. Have two tables (VA->PA) and (PA->MA) — expensive!

2. Guest keeps track of VA->PA, but hypervisor has shadow table to map VA->MA

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you virtualize memory in a paravirtualized environment?

A

Because the guest knows it is virtualized, it can explicitly register page tables with the hypervisor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the ways to virtualize devices?

A

Passthrough, hypervisor direct, and split device driver

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is passthrough virtualization?

A

VMM device driver configures device access permissions and Guest VMs device drivers can access device directly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the cons of passthrough virtualization?

A
  1. device sharing is difficult / impossible
  2. VMM must have the exact type of device expected by the VM
  3. VM migration is hard since the VM is now hardware-dependent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is hypervisor direct virtualization?

A

Hypervisor intercepts all device accesses and emulates the device (translate generic I/O request to hypervisor’s device driver). (-) slow and need device drivers for hypervisor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is split device driver virtualization?

A

Have two drivers: front-end (in guest VM) and back-end (in server VM or host, this is the real driver). Only works in paravirtualized environment

17
Q

What are ways that hardware can support virtualization?

A
  1. Remove bad instructions
  2. Add root/non-root privilege rings
  3. Extended page tables and TLB with VM tag
  4. Multiqueue devices - multiple logical interfaces that each VM can connect to