P3L6 - Virtualization Flashcards

1
Q

What is virtualization?

A

A solution created to allow a user to concurrently run diverse workloads on the same physical hardware without requiring that a single operating system be used

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

T/F: With virtualization, each of the operating systems are deployed on the same physical platform

A

True

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

Each operating system plus its applications and virtual resources are known as _____

A

Virtual Machine (VM)

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

What is responsible for supporting the coexistence of multiple VMs on a single physical machine

A

The Virtualization Layer (VMM or hypervisor)

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

A virtual machine is ____, _____ _____ of a real machine

A

efficient, isolated duplicate

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

What are the 3 responsibilities of the VMM

A
  1. Must provide an environment that is essentially identical to the original machine
  2. Programs that run in the VM must show at worst only minor decreases in speed
  3. Provides safety and isolated among the VMs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the benefits of virtualization?

A
  1. Virtualization enables consolidation (ability to run multiple VMs on a single platform)
  2. Makes migration easier
  3. Helps address availability and reliability
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe the Bare Metal Virtualization Model

A

Also known as hypervisor based or type 1 virtualization, VMM manages all the hardware resources and support execution of VMs

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

What is an issue with the Bare Metal Virtualization Model?

A

Hypervisor must manage all possible devices

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

How can the hypervisor battle managing all the possible devices in the Bare Metal Virtualization Model?

A

It integrates a special virtual machine known as a service VM that runs a standardized OS with full hardware access privileges

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

Describe the Hosted Virtualization Model

A

Hosted or type 2 model involves a full fledged host OS that manages all the hardware resources and integrates a VMM which is responsible for providing the VMs with their virtual platform interface

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

What is one benefit of the hosted virtualization model

A

It can leverage all of the services and mechanisms that are already developed for the host operating system

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

How many protection levels are within x86 architecture?

A

Four known as rings

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

Describe the rings (protection levels) of x86 architecture

A

Ring 0 - Hypervisor - Highest priority can access all resources and execute all hardware-supported instructions
Ring 1 - OS
Ring 3 - Applications

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

Most recent x86 architectures introduce two different protection modes ___ and ____

A

root and non-root

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

T/F: Within each protection mode of x86, 4 rings exist

A

True!

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

Attempts by the guest OS to perform privileged operations cause traps known as _____

A

VMExits

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

What happens when a VMExit occurs?

A

Trigger switch to root mode, passing control to the hypervisor

19
Q

T/F: Guest instructions are executed directly by the hardware

A

True

20
Q

What happens when a PRIVILEGED instruction is issued by a guest?

A

Trap to the hypervisor!

21
Q

How many hardware instructions were privileged but did not cause a trap in early x86 platforms?

A

17!

22
Q

What was one way that the problematic hardware instructions were handled?

A

Write the VM binary such that it never executes those instructions – binary translation

23
Q

When the guest OS is not modified, this type of virtualization is called ____ ____

A

full virtualization

24
Q

An approach which gives up on unmodified guests and instead focuses on performance is known as ______

A

paravirtualization

25
Q

Describe paravirtualization

A

Guest now knows that is running in virtualized environment on top of a hypervisor as opposed native physical resources

26
Q

A paravirtualized guest OS may not directly try to perform operations that is knows will fail but will instead make explicit calls to the _____ known as ____

A

hypervisor

hypercalls

27
Q

In full virtualization, describe the three types of addresses

A
  1. Virtual Addresses - Used by applications in the Guest
  2. Physical Addresses - used by the kernel of the guest
  3. Machine Address - Corresponding to the actual physical address on the underlying physical platform
28
Q

How many page tables are there in full virtualization?

A

Two - One maintained by the guest OS and one maintained by the hypervisor

29
Q

Describe the passthrough model

A

The VMM-level driver is responsible for configuring access to a device. Guest VM has exclusive access to a device

30
Q

T/F: In the passthrough model the VM can directly access the device without interacting with the VMM

A

True

31
Q

What are the problems with passthrough?

A

Makes sharing devices across VMs difficult!

Breaks the decoupling of VM from hardware

32
Q

In the passthrough model who operations on and controls the device

A

The Guest VM and the device driver in the guest VM

33
Q

What is a benefit of virtualization

A

The guest VMs are decoupled from the physical hardware

34
Q

Describe the hypervisor direct model

A

The hypervisor intercepts every device access request

35
Q

What is a benefit of the hypervisor direct model

A

VM remains decoupled from the physical platform/device

36
Q

What is a downside of the hypervisor direct model

A

Device emulation step adds latency to device access

37
Q

Describe the Split Device Driver Model

A

All device accesses are controlled in a way that involves a component that resides in a guest VM and a component that resides in a hypervisor layer

38
Q

Why must the virtualization have the Guest OS and Applications at different protection levels?

A

“We don’t want a single application, when it crashes, to take down the guest OS”

39
Q

Why must the virtualization have the VMM and Guest OS at different protection levels?

A

“We don’t want a single faulty or malicious guest OS to bring down the hyperviso r in the entire machine”

40
Q

Where processor virtualization is concerned, how are privileged and non-privileged operations handled differently and why?

A

Non Privileged:
The VMM does not interfere. The instructions operate at hardware speed.

Privileged:
The processor causes a trap.
The VMM/Hypervisor takes over and decided whether to allow the instruction or not.

Why?: For safety

41
Q

Where processor virtualization is concerned, how are privileged and non-privileged operations handled similarly?

A
  • All guest instructions are executed directly on the hardware.
42
Q

How does paravirtualization help avoid the “cursed 17 calls” or issues like it?

A

In para, the Guest OS is aware that it is virtual. It will not make any of the “cursed 17” calls because it knows they will fail.

Instead, it makes alternative calls directly to the hypervisor.

43
Q

Which of the following will cause a trap and exit to the hypervisor (for both binary translation and paravirtualized)

  • Access a page that’s swapped
  • Update to page table entry
A
  • Access a page that’s swapped

This will always cause a trap because swapping a page will require the hardware MMU to get involved.

Updating a page table entry may or may not cause a trap, depending on if the Guest OS has been given write permissions.