28. Xen and the Art of Virtualization Flashcards

1
Q

What kind of paper is Xen and the Art of Virtualization?

A

A big idea paper AND a wrong way paper

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

What’s the wrong way part of Xen and the Art of Virtualization?

A

Full virtualization

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

What is the tradeoff to employing paravirtualization?

A

Trade off small changes to the guest OS for big improvements in performance and VMM simplicity

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

What are the four design principles of Xen?

A
  1. Support for unmodified application binaries is essential, or users will not transition to Xen. Hence we must virtualize all architectural features required by existing standard ABIs”
  2. Supporting full multi-application operating systems is important, as tihs allows complex server configurations to be virtualized within a single guest OS instance
  3. Paravirtualization is necessary to obtain high performance and strong resource isolation on uncooperative machine architectures such as x86
  4. Even on cooperative machine architectures, completely hiding the effects of resource virtualization from guest OSes risks both correctness and performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a hypervisor?

A

A small piece of control software similar to the VMM running below all the operating systems running on the machine

Much of the typical VMM functionality is moved to contorl plane software that runs inside a Xen guest

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

How does Xen avoid the drawbacks of full virtualization?

A

Presenting a virtual machine abstraction that is similar but not identical to the underlying hardware – an approach which has been dubbed paravirtualization.

This promises improved performance, although it does require modifications to the guest OS.

It is important to note, however, that we do not require changes to the application binary interface (ABI), and hence no modifications are required to guest applications

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

What does it mean to leave the Application Binary Interface (ABI) alone?

A

We don’t have to change the binary code at all, meaning we don’t have to recompile and rebuild all of our programs.

This is especially good because some of those binaries might be irrecoverable because we got them from source code we no longer have or from proprietary sources

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

What changes does Xen make to segmentation?

Memory Management

A

Cannot install fully-privileged segment descriptors and cannot overlap with the top end of the linear address space

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

What changes does Xen make to paging?

Memory Management

A

Guest OS has direct read access to hardware page tables, but updates are batched and validated by the hypervisor. A domain may be allocated discontiguous machine pages

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

What changes does Xen make to protection?

CPU

A

Guest OS must run at a lower privilege level than Xen

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

What changes does Xen make to exceptions?

CPU

A

Guest OS must register a descriptor table for exception handlers with Xen. Aside from page faults, the handlers remain the same.

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

What changes does Xen make to system calls?

CPU

A

Guest OS may install a ‘fast’ handler for system calls, allowing direct calls from an application into its guest OS and avoid indirecting trough Xen on every call

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

What changes does Xen make to interrupts?

CPU

A

Hardware interrupts are replaced with a lightweight event system

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

What changes does Xen make to time?

CPU

A

East guess OS has a timer interface and is aware of both ‘real’ and ‘virtual’ time

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

What changes does Xen make to network, disk, etc?

Device I/O

A

Virtual devices are elegant and simple to access. Data is transferred using asynchronous I/O rings. An event mechanism replaces hardware interrupts for notifications

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

What two things make virtualizing memory easier?

A
  1. A software-managed TLB, which can be efficiently virtualized
  2. A TLB with address space identifiers which does not need to be flushed on the transition
17
Q

How does Xen ensure safety between OSes?

A

Each time a guest OS requires a new page table, perhaps because a new process is being created, it allocates and initializes a page from its own memory reservation and registers it with Xen.

At this point the OS must relinquish direct write privileges to the page-tabled memory: all subsequent updates must be validated by Xen

18
Q

Describe the need for >2 privilege levels using Xen.

A

Principally, the insertion of a hypervisor below the operating system violates the usual assumption that the OS is the most privileged entity in the system.

In order to protect the hypervisor fro IS misbehavior (and domains from one another) guest OSes must be modified to run at a lower privilege level.

19
Q

How do x86 privilege rings help with the problem of CPU interface?

A

Efficient virtualization of privilege levels is possible x86 because it supports four distinct privilege levels in hardware. The x86 privilege levels are generally described as rings, and are numbered from zero (most privileged) to three (least privileged). OS code typically executes in ring 0 because no other ring can execute privileged instructions, while ring 3 is generally used for application code.

20
Q

What exceptions happen enough to create a performance problem for Xen virtualization?

A

Page faults and system calls.

Typically only two types of exception occur frequently enough to affect system performance: system calls (which are usually implemented via a software exception), and page faults. We improve the performance of system calls by allowing each guest OS to register a ‘fast’ exception handler which is accessed directly by the processor without indirecting via ring 0; this handler is validated before installing it in the hardware exception table

21
Q

Compare para- vs full virtualization.

A

Full virtualization doesn’t change the OS…except at runtime!

Paravirtualization is when minimal changes are made to the OS, which sometimes results in better interaction between the OS and virtual hardware