Virtualization Technology

Содержание

Слайд 2

Virtualization: rejuvenation

1960’s: first track of virtualization
Time and resource sharing on expensive mainframes
IBM

Virtualization: rejuvenation 1960’s: first track of virtualization Time and resource sharing on
VM/370
Late 1970’s and early 1980’s: became unpopular
Cheap hardware and multiprocessing OS
Late 1990’s: became popular again
Wide variety of OS and hardware configurations
VMWare
Since 2000: hot and important
Cloud computing

Слайд 3

IBM VM/370

Robert Jay Creasy (1939-2005)
Project leader of the first full virtualization hypervisor:

IBM VM/370 Robert Jay Creasy (1939-2005) Project leader of the first full
IBM CP-40, a core component in the VM system
The first VM system: VM/370

Слайд 4

IBM VM/370

System/370

Control Program (CP)

Conversational Monitor System (CMS)

Mainstream OS (MVS, DOS/VSE etc.)

Specialized VM

IBM VM/370 System/370 Control Program (CP) Conversational Monitor System (CMS) Mainstream OS
subsystem (RSCS, RACF, GCS)

Another copy of VM

Hardware

Hypervisor

Virtual machines

Слайд 5

IBM VM/370

Technology: trap-and-emulate

Kernel

Application

CP

IBM VM/370 Technology: trap-and-emulate Kernel Application CP

Слайд 6

Virtualization on x86 architecture

Challenges
Correctness: not all privileged instructions produce traps!
Example: popf
Performance:
System calls:

Virtualization on x86 architecture Challenges Correctness: not all privileged instructions produce traps!
traps in both enter and exit (10X)
I/O performance: high CPU overhead
Virtual memory: no software-controlled TLB

Слайд 7

Virtualization on x86 architecture

Solutions:
Dynamic binary translation & shadow page table
Hardware extension
Para-virtualization (Xen)

Virtualization on x86 architecture Solutions: Dynamic binary translation & shadow page table Hardware extension Para-virtualization (Xen)

Слайд 8

Dynamic binary translation

Idea: intercept privileged instructions by changing the binary
Cannot patch the

Dynamic binary translation Idea: intercept privileged instructions by changing the binary Cannot
guest kernel directly (would be visible to guests)
Solution: make a copy, change it, and execute it from there
Use a cache to improve the performance

Слайд 9

Dynamic binary translation

Pros:
Make x86 virtualizable
Can reduce traps
Cons:
Overhead
Hard to improve system calls, I/O

Dynamic binary translation Pros: Make x86 virtualizable Can reduce traps Cons: Overhead
operations
Hard to handle complex code

Слайд 10

Shadow page table

Shadow page table

Слайд 11

Shadow page table

Guest page table

Shadow page table

Shadow page table Guest page table Shadow page table

Слайд 12

Shadow page table

Pros:
Transparent to guest VMs
Good performance when working set fit into

Shadow page table Pros: Transparent to guest VMs Good performance when working
shadow page table
Cons:
Big overhead of keeping two page tables consistent
Introducing more issues: hidden fault, double paging …

Слайд 13

Hardware support

First generation - processor
Second generation - memory
Third generation – I/O device

Hardware support First generation - processor Second generation - memory Third generation – I/O device

Слайд 14

First generation: Intel VT-x & AMD SVM

Eliminating the need of binary translation

Host

First generation: Intel VT-x & AMD SVM Eliminating the need of binary
mode

Guest mode

VMRUN

VMEXIT

Слайд 15

Second generation: Intel EPT & AMD NPT

Eliminating the need to shadow

Second generation: Intel EPT & AMD NPT Eliminating the need to shadow page table
page table

Слайд 16

Third generation: Intel VT-d & AMD IOMMU

I/O device assignment
VM owns real device
DMA

Third generation: Intel VT-d & AMD IOMMU I/O device assignment VM owns
remapping
Support address translation for DMA
Interrupt remapping
Routing device interrupt

Слайд 17

Para-virtualization

Full vs. para virtualization

Para-virtualization Full vs. para virtualization

Слайд 18

Xen and the art of virtualization

SOSP’03
Very high impact

Xen and the art of virtualization SOSP’03 Very high impact

Слайд 19

Overview of the Xen approach

Support for unmodified application binaries (but not OS)
Keep

Overview of the Xen approach Support for unmodified application binaries (but not
Application Binary Interface (ABI)
Modify guest OS to be aware of virtualization
Get around issues of x86 architecture
Better performance
Keep hypervisor as small as possible
Device driver is in Dom0

Слайд 20

Xen architecture

Xen architecture

Слайд 21

Virtualization on x86 architecture

Challenges
Correctness: not all privileged instructions produce traps!
Example: popf
Performance:
System calls:

Virtualization on x86 architecture Challenges Correctness: not all privileged instructions produce traps!
traps in both enter and exit (10X)
I/O performance: high CPU overhead
Virtual memory: no software-controlled TLB

Слайд 22

CPU virtualization

Protection
Xen in ring0, guest kernel in ring1
Privileged instructions are replaced with

CPU virtualization Protection Xen in ring0, guest kernel in ring1 Privileged instructions
hypercalls
Exception and system calls
Guest OS registers handles validated by Xen
Allowing direct system call from app into guest OS
Page fault: redirected by Xen

Слайд 23

CPU virtualization (cont.)

Interrupts:
Lighweight event system
Time:
Interfaces for both real and virtual time

CPU virtualization (cont.) Interrupts: Lighweight event system Time: Interfaces for both real and virtual time

Слайд 24

Memory virtualization

Xen exists in a 64MB section at the top of every

Memory virtualization Xen exists in a 64MB section at the top of
address space
Guest sees real physical address
Guest kernels are responsible for allocating and managing the hardware page tables.
After registering the page table to Xen, all subsequent updates must be validated.

Слайд 25

I/O virtualization

Shared-memory, asynchronous buffer descriptor rings

I/O virtualization Shared-memory, asynchronous buffer descriptor rings

Слайд 26

Porting effort

Porting effort

Слайд 27

Evaluation

Evaluation

Слайд 28

Evaluation

Evaluation

Слайд 29

Evaluation

Evaluation
Имя файла: Virtualization-Technology.pptx
Количество просмотров: 23
Количество скачиваний: 0