Xen and the Art of Virtualization A paper from the University of Cambridge, presented by Charlie Schluting For CS533 at Portland State University.

Slides:



Advertisements
Similar presentations
Virtualization Technology
Advertisements

XEN AND THE ART OF VIRTUALIZATION Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, lan Pratt, Andrew Warfield.
E Virtual Machines Lecture 3 Memory Virtualization
Bart Miller. Outline Definition and goals Paravirtualization System Architecture The Virtual Machine Interface Memory Management CPU Device I/O Network,
Virtual Machines What Why How Powerpoint?. What is a Virtual Machine? A Piece of software that emulates hardware.  Might emulate the I/O devices  Might.
CS-3013 & CS-502, Summer 2006 Virtual Machine Systems1 CS-502 Operating Systems Slides excerpted from Silbershatz, Ch. 2.
CS 333 Introduction to Operating Systems Class 11 – Virtual Memory (1)
G Robert Grimm New York University Disco.
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
OS Spring’03 Introduction Operating Systems Spring 2003.
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 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.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
Tanenbaum 8.3 See references
1 CS503: Operating Systems Part 1: OS Interface Dongyan Xu Department of Computer Science Purdue University.
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.
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.
Benefits: Increased server utilization Reduced IT TCO Improved IT agility.
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.
VirtualBox What you need to know to build a Virtual Machine.
Xen and The Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt & Andrew Warfield.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto OS-Related Hardware.
CS533 Concepts of Operating Systems Jonathan Walpole.
Operating Systems COMP 4850/CISG 5550 Page Tables TLBs Inverted Page Tables Dr. James Money.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
Introduction to virtualization
Operating Systems Security
Processes and Virtual Memory
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,
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Lecture 4 Page 1 CS 111 Online Modularity and Memory Clearly, programs must have access to memory We need abstractions that give them the required access.
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
Virtualization Neependra Khare
Xen and the Art of Virtualization
Translation Lookaside Buffer
Virtualization.
Virtual Machine Monitors
Xen and the Art of Virtualization
Presented by Yoon-Soo Lee
CS 6560: Operating Systems Design
Virtual Memory - Part II
Modeling Page Replacement Algorithms
Swapping Segmented paging allows us to have non-contiguous allocations
Virtualization overview
Xen: The Art of Virtualization
Disco: Running Commodity Operating Systems on Scalable Multiprocessors
Running other code under LINUX
CS 140 Lecture Notes: Virtual Machines
OS Virtualization.
A Survey on Virtualization Technologies
Modeling Page Replacement Algorithms
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Lecture 3: Main Memory.
CS 140 Lecture Notes: Virtual Machines
Xen and the Art of Virtualization
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
OPERATING SYSTEMS MEMORY MANAGEMENT BY DR.V.R.ELANGOVAN.
System Virtualization
CS295: Modern Systems Virtualization
Presentation transcript:

Xen and the Art of Virtualization A paper from the University of Cambridge, presented by Charlie Schluting For CS533 at Portland State University

Virtualization Originally used to provide multiple environments identical to the host OS Then, virtual machines were used to isolate applications from the machine: Java And now we have hardware emulation

Emulation types Full hardware emulation: completely simulates hardware, guest OS run unmodified Paravirtualization: not emulated, but the host (virtual machine) provides an API for guests. This is Xen. Native: limited emulation, just enough to allow the unmodified guest to run on the hardware and still provide isolation

Xen Why? Servers sit idle most of the time. Paravirtualization, guest OS’s must be ported to use the API calls. Design goals: –They don’t care about OS compatibility –They strongly care about resource provisioning and security (these two things go together, too) –Also, performance shouldn’t be compromised.

The Xen Way They state a few reasons why full virtualization is so slow: –x86 requires many things to occur in privileged-mode execution, but attempts to execute them in non-privileged mode fails silently instead of causing a trap. –All non-trapping privileged instructions must be caught and handled. –Virtualizing the MMU is also difficult

The Xen Way, cont’d Guest OS’s also need to see the real hardware in some cases. –TCP, e.g. uses RTT calculations to determine window sizes (buffer of sent but unacknowledged data). –Real machine memory addresses allows the guest OS to perform better and page properly. Xen provides a “machine abstraction that is similar but not identical to the underlying hardware” [1].

Memory Management Sadly, x86 doesn’t support a software- managed TLB (misses are handled in hardware automatically). Xen makes sure all valid translations are present in the page table, and the guest OS manages its own paging in a shadow table. Xen exists in the top 64MB of every address space, to avoid TLB flushes when entering/leaving Xen.

Memory Management Guests allocate their own page tables and register them with Xen. Future updates are validated by Xen, i.e. “registering” involves the guest giving up write capabilities to the page table memory. This ensures security: guests can’t map memory that doesn’t belong to them.

Physical Memory The allocation for each guest OS happens all at once. So memory is partitioned, but can dynamically grow. Xen provides a translation array, that all domains can read, to map virtual to physical addresses.

CPU The CPU is simulated, in a sense. –Xen is run at a higher level than all the guest OS’s. –Guest OS’s are modified to run at a lower level (i.e. the OS is an application). The guest OS protects itself by running in its own address space. Context switches are done through Xen.

CPU x86 has rings 1 and 2 that are rarely used. So guests are modified to run in 1. They still can’t run privileged instructions, but they’re isolated from applications running in ring 3. Handlers are registered with Xen to validate exceptions.

Page Faults OS’s normally read the faulting address from a privileged register. Xen can’t, if it runs in ring 1. Xen’s handler (running in 0 in the host OS) creates an “extended stack frame” where the address is copied to. Control is then returned to the guest OS. Page faults are special, but other system calls can be dealt with via their Fast Exception Handler, that bypasses ring 0 by installing the registered hander in the hardware exception table.

Device I/O No emulation! Data is passed via shared memory to Xen. Passsing data is done with i/o rings. –Ring: circular queue of descriptors allocated by the guest. –Use producer/consumer pointers to signal Xen or the guest that data is ready.

Network I/O A packet is sent by placing the file descriptor in a transmit queue. Packets are never copied between guest and Xen! Xen also implements “rules” that can be used as a firewall. Packets are inspected before being sent to the upper layer, the guest in this case, just like the OS does already.

Disk I/O Guests are give X amount of virtual disk in the beginning. Virtual Block Devices are presented. Xen handles the translation onto real disk. Once Xen validates, DMA to the memory in the guest is allowed to happen. Zero-copy.

Performance is Key But OS’s have to be modified… It’s only about 3000 lines of code in Linux. They’re working on Windows.. But will never be able to release it.

Lots of performance stats

Performance Like they said… only 8% slower most of the time. Interesting, that they choose to test a “MTU” of 500 on a gigabit network:

Performance When Running Many Xen’s Their goal was to scale to 100 guests running at a time. On dual proc machines, performance (in all tests) was nearly double when running two OS’s. Adding more, of course slowed everything down. Xen outperforms everything else, though. Confusing graphs omitted.

Performance is a Security Issue Too They ran many benchmarks again, but with malicious guest OS’s running at the same time. One was running a fork bomb, one was trying to allocate 3GB of RAM, freeing, and starting over, and another was copying huge amounts of data from disk. The benchmarks were only mildly effected!

Xen, Since the Paper New, or unmentioned features: –Xen can be “live migrated.” –According to the webpage, IA64 and PPC ports are underway. –FreeBSD and NetBSD ports have been completed. Novell ships Suse with Xen now. –Intel contributed to support their Vanderpool extensions… so unmodified VMs can run on Xen. But slower, obviously.

Go Install Xen!