Operating System Support for Virtual Machines Samuel King, George Dunlap, Peter Chen Univ of Michigan Ashish Gupta.

Slides:



Advertisements
Similar presentations
Bart Miller. Outline Definition and goals Paravirtualization System Architecture The Virtual Machine Interface Memory Management CPU Device I/O Network,
Advertisements

G Robert Grimm New York University Disco.
Xen and the Art of Virtualization A paper from the University of Cambridge, presented by Charlie Schluting For CS533 at Portland State University.
Network Implementation for Xen and KVM Class project for E : Network System Design and Implantation 12 Apr 2010 Kangkook Jee (kj2181)
Virtual Machines Measure Up John Staton Karsten Steinhaeuser University of Notre Dame December 15, 2005 Graduate Operating Systems, Fall 2005 Final Project.
Disco Running Commodity Operating Systems on Scalable Multiprocessors.
1 Disco: Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine, and Mendel Rosenblum, Stanford University, 1997.
Hosted VMM Architecture Advantages: –Installs and runs like an application –Portable – host OS does I/O access –Coexists with applications running on.
KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor Fall 2014 Presented By: Probir Roy.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
© 2001 VMware, Inc. All rights reserved. The Future of Virtual Machines: A VMware Perspective Ed Bugnion Co-founder, VMware Inc. JUGS September 27, 2001.
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #29-1 Chapter 33: Virtual Machines Virtual Machine Structure Virtual Machine.
Operating System Support for Virtual Machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
Virtualization for Cloud Computing
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
LINUX Virtualization Running other code under LINUX.
Xen and the Art of Virtualization. Introduction  Challenges to build virtual machines Performance isolation  Scheduling priority  Memory demand  Network.
Paper by Jeremy Sugerman, Ganesh Venkitachalam, Beng-Hong Lim Presented by Kit Cischke.
CSE598C Virtual Machines and Their Applications Operating System Support for Virtual Machines Coauthored by Samuel T. King, George W. Dunlap and Peter.
Virtualization Technology Prof D M Dhamdhere CSE Department IIT Bombay Moving towards Virtualization… Department of Computer Science and Engineering, IIT.
Tanenbaum 8.3 See references
Zen and the Art of Virtualization Paul Barham, et al. University of Cambridge, Microsoft Research Cambridge Published by ACM SOSP’03 Presented by Tina.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Disco : Running commodity operating system on scalable multiprocessor Edouard et al. Presented by Jonathan Walpole (based on a slide set from Vidhya Sivasankaran)
CS533 Concepts of Operating Systems Jonathan Walpole.
Operating System Support for Virtual Machines Samuel T. King, George W. Dunlap,Peter M.Chen Presented By, Rajesh 1 References [1] Virtual Machines: Supporting.
Virtualization Concepts Presented by: Mariano Diaz.
KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor Christoffer Dall Department of Computer Science Columbia University
Operating System Support for Virtual Machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
Xen I/O Overview. Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient.
Virtual Machine Monitors: Technology and Trends Jonathan Kaldor CS614 / F07.
KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor Christoffer Dall Department of Computer Science Columbia University
Penn State CSE “Optimizing Network Virtualization in Xen” Aravind Menon, Alan L. Cox, Willy Zwaenepoel Presented by : Arjun R. Nath.
Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
High Performance Computing on Virtualized Environments Ganesh Thiagarajan Fall 2014 Instructor: Yuzhe(Richard) Tang Syracuse University.
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine, and Mendel Rosenblum Summary By A. Vincent Rayappa.
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Edouard et al. Madhura S Rama.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
Outline for Today Announcements –1 st programming assignment coming soon. Objective of the lecture –OS and Virtual Machines.
Disco : Running commodity operating system on scalable multiprocessor Edouard et al. Presented by Vidhya Sivasankaran.
Introduction to virtualization
Full and Para Virtualization
Lecture 26 Virtual Machine Monitors. Virtual Machines Goal: run an guest OS over an host OS Who has done this? Why might it be useful? Examples: Vmware,
Operating-System Structures
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Presented by: Pierre LaBorde, Jordan Deveroux, Imran Ali, Yazen Ghannam, Tzu-Wei.
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
E Virtual Machines Lecture 1 What is Virtualization? Scott Devine VMware, Inc.
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Virtualization-optimized architectures
Introduction to Virtualization
Virtual Machine Monitors
Kernel Design & Implementation
L2- Virtualization Technology
Operating System Support for Virtual Machines
Lecture 24 Virtual Machine Monitors
Disco: Running Commodity Operating Systems on Scalable Multiprocessors
Running other code under LINUX
OS Virtualization.
Virtualization Techniques
Operating System Support for Virtual Machines
A Survey on Virtualization Technologies
Lecture Topics: 11/1 General Operating System Concepts Processes
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Introduction to Virtual Machines
Introduction to Virtual Machines
Xen and the Art of Virtualization
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Presentation transcript:

Operating System Support for Virtual Machines Samuel King, George Dunlap, Peter Chen Univ of Michigan Ashish Gupta

Overview Motivation Classification of VMs Advantage of Type II VMs About UMLinux: exploiting Linux caps How UMLinux works ? The three bottlenecks, their solutions Performance results Conclusions: Modifying host OS helps !

Two classifications for VM Higher Level Interface VM/370 VMWare DenaliUMLinux SimOS Xen VMWare Guest tools VAX VMM Security Kernel u-kernelsJVM 1

Two classifications for VM Underlying Platform VM/370 VMWare ESX Disco Denali Xen VMWare Workstation VirtualPC SimOS UMLinux 2 Type II Type I Convenience Performance

UMLinux Higher level interface slightly different Guest OS needs to be modified –Simple device drivers added –Emulation of certain instructions (iret and in/out) –Kernel Re-linked to different address 17,000 lines of change ptrace  virtualization –Intercepts guest system calls –Tracks transitions

Advantage of Type II VM Guest Machine Process Virtual CPU Host files and devices Virtual I/O Devices Host Signals Virtual Interrupts mmap munmap Virtual MMU

The problem

Compiling the Linux Kernel lines to Host OS

Compiling the Linux Kernel lines to Host OS

Optimization One System calls

Lots of context switches between VMM Guest machine process

Use VMM as a Kernel module Modification to Host OS also…

?

Optimization Two Memory protection

Frequent switching between Guest Kernel and Guest application

Guest Kernel to Guest User

Guest User to Guest Kernel Through mmap, munmap and mprotect Very expensive…

Host Linux Memory Management x86 paging provides built-in protection to memory pages Linux uses page tables for translation and protection Segments used only to switch between privilege levels Uses supervisor bit to disallow ring 3 to access certain pages The idea: segments bound features are relatively unused

Solution: Change Segment bounds for each mode

Optimization Three Context Switching

The problem with context switching: –Have to remap user process’s virtual memory to the “virtual” physical memory –Generates large number of mmaps  costly The solution: –Allow one process to maintain multiple address- spaces –Each address space  different set of page tables –New system call : switch guest, whenever context switching

Multiple Page Table Sets Page Table Ptr Host operating system Guest OS guest proc a guest proc b switchguest syscall

Conclusion Type II VMM CAN be as fast as type I by modifying the Host OS Is the title of paper justified ?

Virtualizing I/O Devices on VMware Workstation’s Hosted VMM Jeremy Sugerman, Ganesh Venkitachalam and Beng-Hong Lim VMware, Inc.

Introduction VM Definition from IBM: –a “virtual machine” is a fully protected and isolated copy of the underlying physical machine’s hardware. The choice for hosted architecture –Relies upon host OS for device support Primary Advantage –Copes with diversity of hardware –Compatible with pre-existing PC software –Near native performance for CPU intensive workloads

The major tradeoff I/O performance degradation I/O emulation done in host world –Switching between the host world and the VMM world

How I/O works VM AppVMM VM Driver Application Portion Privileged Portion I/O Request I/O Virtualization CPU Virtualization H/w interrupt Interrupt reasserted

I/O Virtualization VMM intercepts all I/O operations –Usually privileged IN, OUT operations Emulated either in VMM on in VMApp Host OS drivers understand the semantics of port I/O, VMM doesn’t Physical Hardware I/O must be handled in Host OS Lot of Overhead from world switching –Which devices get affected ? –CPU gets saturated before I/O…

The Goal of this paper I/O CPU I/O CPU

The Network Card Virtual NIC appears as a full fledged PCI Ethernet Controller, with its own MAC address Connection implemented by a VMNet driver loaded in the Host OS Virtual NIC : a combination of code in the VMM and VMApp –Virtual I/O Ports and Virtual IRQs

HOSTHOST VMMVMM Sending a Packet

VMMVMM HOSTHOST HOSTHOST Receiving a Packet

Experimental Setup Nettest: throughput tests

Time profiling Extra work: Switching worlds for every I/O instruction: most expensive I/O interrupt for every packet sent and received: –VMM, host and guest interrupt handlers are run ! Packet trans: two device drivers Packet copy on transmit

Optimization One Primary aim: Reduce world switches Idea: Only a third of the I/O instructions trigger packet trans. –Emulate the rest in VMM The Lance NIC address I/O has memory semantics –I/O  MOV ! –Strips away several layers of virtualization

Optimization Two Very high interrupt rate for data trans. When does a world switch occur: –A packet is to be transmitted –A real interrupt occurs e.g. timer interrupt The Idea: Piggyback the packet interrupts on the real interrupts –Queue the packets in a ring buffer –Transmit all buffered packets on next switch Works well for I/O intensive workloads

Packet Transmit Real Interrupt

Optimization Three Reduce host system calls for packet sends and receives Idea: Instead of select, use a shared bit-vector, to indicate packet availability Eliminates costly select() ?

Summary of three optimizations  Native  VM/733 MHz Version 2.0  VM/733 MHz Optimized Guest OS idles

Summary of three optimizations  Native  VM/350 MHz Version 2.0  VM/350 MHz Optimized

Most effective Optimization ? Emulating IN and OUT to Lance I/O ports directly in VMM Why ? –Eliminates lots of world switches –I/O changed to MOV instruction

Further avenues for Optimization ? Modify the Guest OS –Substitute expensive-to-virtualize instructions e.g. MMU instructions. Example ?? –Import some OS functionality into VMM –Tradeoff: can use off-the-shelf Oses An idealized virtual NIC (Example ??) –Only one I/O for packet transmit instead of 12 ! –Cost: custom device drivers for every OS –VMWare Server version

Further avenues for Optimization ? Modify the Host OS: Example ?? –Change the Linux networking stack Poor buffer management –Cost: requires co-operation from OS Vendors Direct Control of Hardware: VMWare ESX –Fundamental limitations of Hosted Architecture –Idea: Let VMM drive I/O directly, no switching –Cost ??