Presentation is loading. Please wait.

Presentation is loading. Please wait.

E Virtual Machines Lecture 4 Device Virtualization

Similar presentations


Presentation on theme: "E Virtual Machines Lecture 4 Device Virtualization"— Presentation transcript:

1 E6998 - Virtual Machines Lecture 4 Device Virtualization
Scott Devine VMware, Inc.

2 Outline Types of Device Virtualization Storage Virtualization
Direct Access Emulated Para-virtualized Storage Virtualization Copy-on-Write Disks

3 Computer System Organization
CPU Memory MMU Controller Local Bus Interface High-Speed I/O Bus Frame Buffer NIC Controller Bridge LAN Low-Speed I/O Bus CD-ROM USB

4 Device Virtualization
Goals Isolation Multiplexing Speed Mobility Interposition Device Virtualization Strategies Direct Access Emulation Para-virtualization

5 Direct Access Device CPU VM Local Bus High-Speed I/O Bus Low-Speed
Guest OS CPU Memory MMU Controller Local Bus Interface High-Speed I/O Bus Frame Buffer NIC Controller Bridge LAN Low-Speed I/O Bus CD-ROM USB

6 Memory Isolation w/ Direct Access Device
VM Guest OS CPU Memory MMU Controller Local Bus Interface IOMMU High-Speed I/O Bus Frame Buffer NIC Controller Bridge LAN Low-Speed I/O Bus CD-ROM USB

7 Virtualization Enabled Device
VM1 Guest OS VM2 Guest OS CPU Memory MMU Controller Local Bus Interface IOMMU High-Speed I/O Bus vNIC 1 vNIC 2 Frame Buffer NIC Controller Bridge LAN Low-Speed I/O Bus CD-ROM USB

8 Direct Access Device Virtualization
Allow Guest OS direct access to underlying device Positives Fast Simplify monitor Limited device drivers needed Negatives Need hardware support for safety (IOMMU) Need hardware support for multiplexing Hardware interface visible to guest Limits mobility of VM Interposition hard by definition

9 Emulated Devices Emulate a device in class Convert
Emulated registers Memory mapped I/O or programmed I/O Convert Intermediate representation Back-ends per real device

10 Serial Port Example User App Guest Host OS Monitor Serial Chip ABC
Emulation Generic Serial Layer Serial Chip ABC Driver Host OS Monitor Serial Chip XYZ LAN

11 Emulated Devices Positives Negatives Platform stability
Allows interposition No special hardware support needed Isolation, multiplexing implemented by monitor Negatives Can be slow Drivers needed in monitor or host

12 Para-Virtualized Devices
Guest passes requests to Monitor at a higher abstraction level Monitor calls made to initiate requests Buffers shared between guest / monitor Positives Simplify monitor Fast Negatives Monitor needs to supply guest-specific drivers Bootstrapping issues

13 Traditional Architecture
Linux Linux (devel) XP Vista MacOS Virtual Machine Monitor Here the monitor needs to be self-sufficient. There is no help from an Operating System. What does this mean the monitor needs to have: CPU scheduler Memory allocator Device Drivers File system Network stack for administration Hardware

14 Hosted Monitor Architecture
User App Guest OS (Linux) Host OS (Window XP) Virtual Machine Monitor Kernel Module The virtual machine monitor runs in its own address space at kernel level. The VMM time shares the hardware with the host. When the UserApp runs in the host, it switches to the VMM by way of a World Switch. The world switch save all the registers, page tables, etc of the host and then loads the state of the VMM. Initially the state of the VMM is setup up by the UserApp. This includes what the registers should be and the structure and contents of the page tables. When the VMM voluntarily gives up the CPU, it World Switches back to the host. Hardware

15 Source: http://www.vmware.com/pdf/esx2_performance_implications.pdf
VMware ESX 2.0 Traditional arch for cpu scheduling, memory allocation, virtual disk, virtual network. Console OS is there for legacy devices, USB, and as a management platform, i.e. it has the network stack. Source:

16 Hybrid Ex 2 - Xen 3.0 Para –virtualization
Linux Guest Hardware-supported virtualization Unmodified Windows Isolated Device Drivers Source: Ottawa Linux Symposium 2006 presentation.

17 Hypervisor Hardware-supported single-use monitor Characteristics Uses
Small size Runs in a special hardware mode Guest OS runs in normal priviledge level Uses Security System management Fault tolerance User Mode Operating System Kernel Mode Monitor Mode Hypervisor Hardware

18 Virtual Disks File on file system Meta-data in file Host file system
Hypervisor file system Meta-data in file Maps disk blocks to file offsets Flat file Indexed file Allows disk to grow on demand

19 Copy-on-Write Disks Win XP + SP1 + SP2 + SP2 IE 7

20 Copy-on-Write Disks Win XP Reads + SP1 + SP2 + SP2 IE 7 Writes

21 Non-persistent Execution
Win XP + SP1 + SP2 + SP2 IE 7 Reads Temp Writes


Download ppt "E Virtual Machines Lecture 4 Device Virtualization"

Similar presentations


Ads by Google