Introduction to virtualization

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
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,
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.
Disco Running Commodity Operating Systems on Scalable Multiprocessors.
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.
KVM/ARM: The Design and Implementation of the Linux ARM Hypervisor Fall 2014 Presented By: Probir Roy.
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #29-1 Chapter 33: Virtual Machines Virtual Machine Structure Virtual Machine.
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. 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.
Basics of Operating Systems March 4, 2001 Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard.
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.
Chapter 5. Outline (2nd part)
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.
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.
Virtualization Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is licensed.
Xen I/O Overview.
Virtual Machine Monitors: Technology and Trends Jonathan Kaldor CS614 / F07.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
Xen and The Art of Virtualization Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt & Andrew Warfield.
Our work on virtualization Chen Haogang, Wang Xiaolin {hchen, Institute of Network and Information Systems School of Electrical Engineering.
CS533 Concepts of Operating Systems Jonathan Walpole.
Disco: Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine, and Mendel Rosenblum Summary By A. Vincent Rayappa.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
Disco : Running commodity operating system on scalable multiprocessor Edouard et al. Presented by Vidhya Sivasankaran.
Cloud Operating System Unit 09 Cloud OS Core Technology M. C. Chiang Department of Computer Science and Engineering National Sun Yat-sen University Kaohsiung,
Operating Systems Security
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,
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.
CSE 451: Operating Systems Winter 2015 Module 25 Virtual Machine Monitors Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Running Commodity Operating Systems on Scalable Multiprocessors Edouard Bugnion, Scott Devine and Mendel Rosenblum Presentation by Mark Smith.
Unit 2 VIRTUALISATION. Unit 2 - Syllabus Basics of Virtualization Types of Virtualization Implementation Levels of Virtualization Virtualization Structures.
Xen and the Art of Virtualization
Virtualization for Cloud Computing
Introduction to Virtualization
Virtualization.
Virtual Machine Monitors
Virtualization Technology
Lecture 13: Virtualization
Xen and the Art of Virtualization
L2- Virtualization Technology
Lecture 11: Virtualization
Presented by Yoon-Soo Lee
Lecture 24 Virtual Machine Monitors
Xen: The Art of Virtualization
Disco: Running Commodity Operating Systems on Scalable Multiprocessors
CIT 480: Securing Computer Systems
OS Virtualization.
Chapter 33: Virtual Machines
Computer Security: Art and Science, 2nd Edition
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Xen and the Art of Virtualization
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
System Virtualization
Chapter 33: Virtual Machines
Presentation transcript:

Introduction to virtualization Cloud Computing Introduction to virtualization

Outline Motivation and introduction Example: Xen techniques Evaluation

What is virtualization Partitioning one physical server to multiple virtual servers Virtual machines are isolated One VM failure will not affect the others Hypervisor software is the key Or called virtualization manager The layer between the hardware/OS and virtual machines Manages the partitioning and isolation of system resources

Broader concept of virtualization Combine multiple physical resources into one single virtual resource Storage virtualization Application virtualization: JVM, .Net Network virtualization Desktop virtualization

Benefits Save money. Save energy Save time Agile development Many companies require one app on one machine for reliability Save energy Less physical servers, less energy consumption Save time Deploy, setup, startup quickly Agile development Developer can use multiple virtual OSes to simulate and test cross-platform software

History Introduced by IBM in the 1960s Gave away to C/S in 80s and 90s To boost utilization of large, expensive mainframe systems Gave away to C/S in 80s and 90s Become hot again Servers are cheap and powerful Become the key component of cloud computing

Basic ideas Virtualize resources CPU Memory Network Disk Key: the layer between hardware and guest OSs – hypervisor software Partitioning, isolating, and scheduling resources between guest Oss

Preliminary (normal OS) Protection rings User space (lower privilege: ring 3) APPS System call/ trap Kernel space (high privilege: ring 0) Have rights to access some special CPU instructions OS (supervisor mode) interrupt Hardware

x86 virtualization User space (ring 3) APPS System call/ trap Privilege (ring 1/2) Have rights to access some special instructions OS (VM) Hypervisor Privilege: ring 0 Have rights to access some special instructions interrupt Hardware

Types of virtualization Container virtualization Full virtualization Para-virtualization

Container virtualization vm1 vm2 Vm_k User space (ring 3) OS Hardware

Container virtualization User-space virtual machines All guests share the same filesystem tree. Same kernel on all virtual machines Unprivileged VMs can’t mount drives or change network settings Provide extra-level of security Native Speeds, no emulation overhead OpenVZ, Virtuozzo, Solaris Containers, FreeBSD Jails, Linux-Vserver

Full virtualization User space (ring 3) vm1 vm2 vmk Emulator OS Hardware

Full virtualization Runs unmodified guests Simulates bios, communicates with VMs through ACPI emulation, BIOS emulation, sometimes custom drivers Guests cannot access hardware Generally worst performance, but often acceptable VMWare, Xen HVM, KVM, Microsoft VM, Parallels, virtualbox

Paravirtualization User space (ring 3) vm1 vm2 vmk monitor hypervisor OS Hardware

Paravirtualization Do not try to emulate everything Better performance Work as a guard Pass safe instructions directly to CPU and device Guests have some exposure to the hardware Better performance Need to slightly modify guest OS, but no need to modify applications Xen, Sun Logical Domains

Xen: introduction Paravirtualization Faster than full virtualization Need to slightly change some guest OS Domain (1-) : guest OS

virtual memory management

Translation Each context switch needs to Invalidate TLB – TLB flushing Add a tag to TLB. No need to flush - Address Space ID (8bits)

Xen: virtual memory management TLB(translation lookaside buffer) flushing CPU cache of page table entries X86 needs TLB flushing for context switching To avoid TLB flushing Updates are batched and validated by the hypervisor Xen exists in a 64MB session at the top of every address space Page table Virtual Address Physical Memory Address

Minimize complexity Let guest OSes allocate and manage the hardware page tables Minimal involvement to ensure safety and isolation

Xen: memory allocation At the beginning of creating guest OS A fixed amount of physical memory is allocated (reservation) Claim additional memory from Xen, when needed; release memory to Xen after finish Allocated memory are not contiguous “Physical memory” a virtual view of contiguous memory by guest OS “hardware memory”: real physical memory Guest OS builds a map between physical memory and hardware memory

When start a new process Guest OS requires a new page table Allocates and initializes a page from its own memory reservation and register it with Xen Relinquish write privileges to the page-table memory – all updates must be validated by Xen

Xen: CPU scheduling Guest OS runs at a lower privilege level than Xen Guest OS must register exception (trap) handlers with Xen Xen will check the handler Page fault is handled differently System calls : no Xen intervention Use a lightweight event system to handle hardware interrupts

application Guest OS app Guest OS xen xen More than two privilege levels only two privilege levels for some processors X86 provides 4 levels of privilege – rings Xen at ring 0, guest OS at ring 1, apps at ring 3

Two types of frequent exception System calls Page faults Improve performance of system calls A fast exception handler accessed directly by the processor without via ring 0; validated before installing it in the hardware exception table Validation: check the handler’s code segment – no execution in ring 0

Xen: device I/O Events: asynchronous notifications from Xen to domains Allocated by the domain; replace device interrupts Guest OS manages data buffers

Xen: device I/O 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 use DMA (zero copy)

Xen: network Virtual firewall-router attached to all domains To send a packet, enqueue a buffer descriptor into the I/O ring Use DMA (no packet copying)

Partitioning resources between guest OSes Memory- preallocated physical memory Disk – quota CPU and network Involves more complicated procedures

Domain 0 The representative to the Xen hypervisor Provide bootstrap code for different types of VMs Creating/deleting virtual network interfaces and virtual block devices for other domains

System looks like

Cost of porting a guest OS to Xen Linux kernel 2.4

Xen: performance Hardware (2003) Dell 2650 dual processor 2.4 GHz Xeon server 2GB RAM 3 Gb Ethernet NIC 1 Hitachi DK32eJ 146 GB 10k RPM SCSI disk Linux 2.4.21 (native)

MMU (memory management) performance

Various benchmarks

Concurrent virtual machines Multiple Apache processes in Linux vs. One Apache process in each guest OS *Higher values are better Requires both high throughput and bounded latency

Performance

Issues Performance isolation vs. maximizing overall system utilization Easy to partition memory and disk Not easy to partition CPU and network Time issue

Recent development Kernel based virtual machine (KVM) A part of the linux kernel (vs. Xen as a standalone hypervisor 2008 result

2013

Hadoop workloads (2013)

Conclusion Xen is a complete and robust GPL VMM Outstanding performance and scalability Excellent resource control and protection Linux 2.6 port required no modifications to core code*