VIRTUALIZATION Xen and the Art of Virtualization

Slides:



Advertisements
Similar presentations
Virtualization Technology
Advertisements

Virtualisation From the Bottom Up From storage to application.
XEN AND THE ART OF VIRTUALIZATION Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, lan Pratt, Andrew Warfield.
Embedded System Lab. Yoon Jun Kee Xen and the Art of Virtualization.
Bart Miller. Outline Definition and goals Paravirtualization System Architecture The Virtual Machine Interface Memory Management CPU Device I/O Network,
Xen , Linux Vserver , Planet Lab
CS-3013 & CS-502, Summer 2006 Virtual Machine Systems1 CS-502 Operating Systems Slides excerpted from Silbershatz, Ch. 2.
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)
Disco Running Commodity Operating Systems on Scalable Multiprocessors.
Xen and the Art of Virtualization University of Cambridge Presenter: Ashish Gupta.
Xen and the art of the virtualization Tao Yang CS708 19/04/07.
Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield.
1 Disco: Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine, and Mendel Rosenblum, Stanford University, 1997.
Microkernels: Mach and L4
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Virtualization for Cloud Computing
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt & Andrew Warfield.
Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield.
Xen and the Art of Virtualization. Introduction  Challenges to build virtual machines Performance isolation  Scheduling priority  Memory demand  Network.
Xen and the Art of Virtualization Paul Barham*, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauery, Ian Pratt, Andrew Wareld.
CSE598C Virtual Machines and Their Applications Operating System Support for Virtual Machines Coauthored by Samuel T. King, George W. Dunlap and Peter.
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.
Virtual Machines Xen and Terra Rajan Palanivel. Xen and Terra : Papers Xen and the art of virtualization. -Univ. of Cambridge Terra: A VM based platform.
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.
CS533 Concepts of Operating Systems Jonathan Walpole.
1 Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield.
Virtualization The XEN Approach. Virtualization 2 CS5204 – Operating Systems XEN: paravirtualization References and Sources Paul Barham, et.al., “Xen.
Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, Andrew Warfield.
Benefits: Increased server utilization Reduced IT TCO Improved IT agility.
Xen Overview for Campus Grids Andrew Warfield University of Cambridge Computer Laboratory.
Xen I/O Overview. Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient.
Xen I/O Overview.
Xen and the Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt & Andrew Warfield.
Virtual Machine Monitors: Technology and Trends Jonathan Kaldor CS614 / F07.
Xen and The Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt & Andrew Warfield.
CS533 Concepts of Operating Systems Jonathan Walpole.
Nathanael Thompson and John Kelm
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.
Introduction to virtualization
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
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
Xen and the Art of Virtualization
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
OS Structures - Xen. Xen Key points Goal: extensibility akin to SPIN and Exokernel goals Main difference: support running several commodity operating.
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
Advanced Operating Systems (CS 202) Virtualization March 7, 2016.
Xen and the Art of Virtualization
Virtualization.
Virtual Machine Monitors
Virtualization Technology
Virtual Machines Disco and Xen (Lecture 10, cs262a)
Xen and the Art of Virtualization
Presented by Yoon-Soo Lee
Xen: The Art of Virtualization
OS Virtualization.
Virtual Machines Disco and Xen (Lecture 10, cs262a)
Xen and the Art of Virtualization
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Operating Systems Structure
Xen and the Art of Virtualization
System Virtualization
Presentation transcript:

VIRTUALIZATION Xen and the Art of Virtualization Are Virtual Machine Monitors Microkernels Done Right? Presented by Brett Fernandes

Problems with Other Architectures Microkernels Poor Performance overhead from IPC Change the ABI Must forfeit all available software for the system Monolithic kernel in disguise? Failure conditions of external pagers Exokernels No application multiplexing No place for the untrustworthy!

Virtual Machines to the rescue? Excellent Performance Achieved through Paravirtualization Retain the same ABIs All required architectural features are virtualized Internal Paging by each VM Application multiplexing is everything Each guest OS can multiplex applications securely The untrustworthy are welcome Strong resource isolation between VMs

VMs - The resurgence rather than the emergence An old idea - IBM 370 in 1972. A Virtual Machine Time-Sharing System (Meyer and Seawright) described the CP-67/CMS – the first virtual machine. Newer ventures: Vmware ESX Server (2001) - successor of Disco The Denali project (2001) - coined the term paravirtualization Sun’s VirtualBox (2008) Microsoft released Hyper-V (2008) Xen is the most widely used by far – available as open source but now owned by Citrix Inc.

Xen and the Art of Virtualization Paul Barham Microsoft Research, UK Nemesis OS (QoS for I/O and virtual memory) Rolf Neugebauer Intel Research, Cambridge, UK Boris Dragovic XenoServer Team (Cambridge 2002), LinSec – Linux Security System Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Ian Pratt Cambridge University, UK Andrew Warfield University of British Columbia

Introduction Challenges to build virtual machines Performance isolation Scheduling priority Memory demand Network traffic Disk accesses Support for various OS platforms Small performance overhead

Xen Principles Unmodified Application Binaries No change to applications required Full multi-application OS support Support for XenoLinux and ongoing work on Windows XP and BSD Paravirtualization High performance Resource Isolation Allows malicious users without harming other VMs Partial view of physical resources provided

Xen: Approach and Overview Multiplexes resources at the granularity of an entire OS As opposed to process-level multiplexing Price: higher overhead Target: 100 virtual OSs per machine Denali supported over a thousand

Xen: Approach and Overview Conventional approach - Full virtualization Virtual hardware is functionally identical to underlying machine Virtualizing the entire instruction set No view of physical resources Problematic for certain privileged instructions Failed silently rather than trapping Shadow structures Vmware traps every update page table event No real time available Hosted OS not modified

Xen: Approach and Overview New approach - paravirtualization Virtual hardware is similar, not identical to the underlying hardware Partial view of the underlying hardware No modification of applications VMs handle paging No shadow tables required Real, virtual and clock time provided Need modifications to the OS porting to Xen for every version of every OS

System Control Mechanism Separation of policy and mechanism Domain0 hosts the application-level management software Creation and deletion of virtual network interfaces and block devices

System Control Mechanism Control Transfer: Hypercalls and Events Hypercall: synchronous calls from a domain to Xen Analogous to system calls Events: asynchronous notifications from Xen to domains Replace device interrupts

CPU Design X86 supports 4 levels of privileges 0 for OS, and 3 for applications Xen downgrades the privilege of OSes System-call and page-fault handlers registered to Xen “fast handlers” for most exceptions, Xen isn’t involved

CPU Implementation Borrowed virtual time scheduling Allows temporary violations of fair sharing to favor recently-woken domains Goal: reduce wake-up latency

Time and Timers Xen provides each guest OS with Real time (since machine boot) Virtual time (time spent for execution) Wall-clock time Each guest OS can program a pair of alarm timers Real time Virtual time

Memory Design The conventional easier approach: Software managed TLB Associate address space IDs with TLB tags Allow coexistence of OSes Avoid TLB flushing across OS boundaries

Memory Design X86 does not have software managed TLB Xen exists at the top 64MB of every address space Avoid TLB flushing when an guest OS enters/exits Xen Each OS can only map to memory it owns Writes are validated by Xen

Physical Memory Implementation Reserved at domain creation times Memory statically partitioned among domains XenoLinux’s balloon driver Does not guarantee contiguous allocation of memory

Virtual Address Translation No shadow pages (VMWare) Xen provides constrained but direct MMU updates All guest OSes have read-only accesses to page tables Updates are batched into a single hypercall

Device I/O Design Xen exposes a set of simple device abstractions Allows an efficient interface which provides protection and isolation I/O data transfer between domains via Xen

Data Transfer: I/O Rings Zero-copy semantics

Disk Access Implementation Only Domain0 has direct access to disks Other domains need to use virtual block devices Use the I/O ring Reorder requests prior to enqueuing them on the ring If permitted, Xen will also reorder requests to improve performance Use DMA (zero copy)

Network Virtual firewall-router attached to all domains Round-robin packet scheduler To send a packet, enqueue a buffer descriptor into the transmit ring Use scatter-gather DMA (no packet copying) A domain needs to exchange page frame to avoid copying Page-aligned buffering

The Cost of Porting an OS to Xen Architecture Independent (78 lines) Virtual Block Device driver (1070 lines) Virtual Network driver (484 lines) Xen specific (1363 lines) < 2% of code-base

Evaluation Against other virtualization techniques Vmware, User Mode Linux(UML) Single Native OS vs Virtual Machine Running multiple applications on a native OS vs a guest OS Performance Isolation between Guest OSs Overhead of running large number of OSs

Relative Performance SPEC INT2000 score SPEC WEB99 CPU Intensive Little I/O and OS interaction SPEC WEB99 180Mb/s TCP traffic Disk read-write on 2GB dataset

O.S Benchmarks Context switching times – extra overhead due to hypercall required to change the page table base.

Concurrent Virtual Machines Multiple Apache processes in Linux vs. One Apache process in each guest OS

Performance Isolation 4 Domains 2 running benchmarks 1 running dd 1 running a fork bomb in the background 2 antisocial domains contributed only 4% performance degradation

Scalability

Issues Extra effort is required to port every version of every OS to Xen Demonstrated by the ‘ongoing effort’ to port Windows XP and BSD Running a full OS is more taxing in terms of resource consumption The requirement of every privileged instruction being validated by Xen results in performance overhead Difficult to implement on an architecture with only 2 privilege levels

Discussion/Takeaways Main achievement – performance. Completely outperformed Vmware in almost all benchmarks Identified potential problems and took steps to minimize them Eg Fast exception handler for system calls OS level multiplexing Solved the problem of performance isolation that plagued traditional OS techniques Innovative approach to TLB Allocation of top 64MB to Xen avoids TLB flushes

Are Virtual Machine Monitor Microkernels Done Right? Steven Hand, Keir Fraser, Evangelos Kotsovinos Cambridge University, UK Andrew Warfield University of British Columbia Dan Magenheimer HP labs, Fort Collins Wrote the first PA-RISC simulator Developed Vblades, the first Itanium VMM

Sparking the Debate Mendel Rosenblum’s claim VMMs are microkernels done right Common system goals Microkernels – Academia vs VMMs - Industry

Microkernels – Noble Idealism Communication oriented A smaller OS core is easier to maintain, validate and port Architecturally better than monolithic kernels

VMMs – Rough Pragmatism Strong resource isolation Main concern is reducing overhead due to extra layer Support execution of out-of-the-box applications Where do Exokernels stand?

Architectural Lessons Liability inversion External pagers in microkernels vs Parallax using VMs for storage IPC Performance Minimum communication between VMs Decoupling of control and data path operations OS as a Component Microkernels forfeit the software available VMMs appeal to developers because of a familiar environment

Discussion Very biased view of the debate Possibly due to several of the authors working on Xen Focused on microkernel flaws and how VMMs were the answer (almost certainly) Knowingly chose to refer to certain aspects of VMMs ambiguously Microkernels and VMMs appear to be more related rather than significantly different.