Virtualization Technology Prof. Dan Connors. Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without.

Slides:



Advertisements
Similar presentations
Virtualisation From the Bottom Up From storage to application.
Advertisements

Virtualization and Cloud Computing
IT344 – Operating Systems Winter 2011, Dale Rowe.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Introduction to Virtual Machines
Virtual Machines. Virtualization Virtualization deals with “extending or replacing an existing interface so as to mimic the behavior of another system”
Virtualization for Cloud Computing
Virtual Machine Monitors CSE451 Andrew Whitaker. Hardware Virtualization Running multiple operating systems on a single physical machine Examples:  VMWare,
CIS 700 Machine Virtualization Autumn 2004.
The Origin of the VM/370 Time-sharing system Presented by Niranjan Soundararajan.
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.
Distributed Systems CS Virtualization- Overview Lecture 22, Dec 4, 2013 Mohammad Hammoud 1.
CSE 451: Operating Systems Winter 2012 Module 18 Virtual Machines Mark Zbikowski and Gary Kimura.
A Survey on Virtualization Technologies
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
Virtualization Concept. Virtualization  Real: it exists, you can see it.  Transparent: it exists, you cannot see it  Virtual: it does not exist, you.
Operating System Virtualization
Zen and the Art of Virtualization Paul Barham, et al. University of Cambridge, Microsoft Research Cambridge Published by ACM SOSP’03 Presented by Tina.
A Survey on Virtualization Technologies Susanta K Nanda.
Microkernels, virtualization, exokernels Tutorial 1 – CSC469.
Virtual Machines: Versatile Platforms for Systems and Processes
A Survey on Virtualization Technologies. Virtualization is “HOT” Microsoft acquires Connectix Corp. EMC acquires VMware Veritas acquires Ejascent IBM,
Virtualization Concepts Presented by: Mariano Diaz.
Xen I/O Overview. Xen is a popular open-source x86 virtual machine monitor – full-virtualization – para-virtualization para-virtualization as a more efficient.
COMP25212: Virtualization Learning Objectives: a)To describe aims of virtualization - in the context of similar aims in other software components b)To.
Virtualization Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is licensed.
Virtualization: Not Just For Servers Hollis Blanchard PowerPC kernel hacker.
Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.
Our work on virtualization Chen Haogang, Wang Xiaolin {hchen, Institute of Network and Information Systems School of Electrical Engineering.
 Virtual machine systems: simulators for multiple copies of a machine on itself.  Virtual machine (VM): the simulated machine.  Virtual machine monitor.
Cloud Operating System Unit 09 Cloud OS Core Technology M. C. Chiang Department of Computer Science and Engineering National Sun Yat-sen University Kaohsiung,
Introduction to virtualization
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Full and Para Virtualization
Lecture 12 Virtualization Overview 1 Dec. 1, 2015 Prof. Kyu Ho Park “Understanding Full Virtualization, Paravirtualization, and Hardware Assist”, White.
Introduction Why are virtual machines interesting?
Operating-System Structures
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,
Cloud Computing – UNIT - II. VIRTUALIZATION Virtualization Hiding the reality The mantra of smart computing is to intelligently hide the reality Binary->
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 Neependra Khare
1 Virtualization "Virtualization software makes it possible to run multiple operating systems and multiple applications on the same server at the same.
CS 695 Topics in Virtualization and Cloud Computing, Autumn 2012 CS 695 Topics in Virtualization and Cloud Computing More Introduction + Processor Virtualization.
Introduction to Operating Systems Concepts
Virtualization for Cloud Computing
A move towards Greener Planet
Introduction to Virtualization
Virtualization.
Virtual Machine Monitors
L2- Virtualization Technology
Virtualization Dr. Michael L. Collard
Virtual Machines: Versatile Platforms for Systems and Processes
Virtualization overview
Virtual Servers.
Running other code under LINUX
OS Virtualization.
Virtualization Techniques
A Survey on Virtualization Technologies
Virtual Machines (Introduction to Virtual Machines)
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Introduction to Virtual Machines
Introduction to Virtual Machines
Virtualization Dr. S. R. Ahmed.
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
CS295: Modern Systems Virtualization
Hypervisor A hypervisor or virtual machine monitor (VMM) is computer software, firmware or hardware that creates and runs virtual machines. A computer.
Presentation transcript:

Virtualization Technology Prof. Dan Connors

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 2 2 Virtualization Real vs. Virtual Similar essence, effect ”Formally” different A framework that combines or divides [computing] resources to present a transparent view of one or more environments Hardware/software partitioning (or aggregation) Partial or complete machine simulation Emulation (partial or complete) Time-sharing (in fact, sharing in general) In general, can be M-to-N mapping (M “real” resources, N “virtual” resources) Examples: VM (M-N), Grid Computing (M-1), Multitasking (1-N)

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 3 3 Virtualization: Motivation Areas Server consolidation Application Consolidation Sandboxing Multiple execution environments Virtual hardware Debugging Software migration (Mobility) Appliance (software) Testing/Quality Assurance

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 4 4 Types of Virtualization Process & application virtualization Process executes on CPU with modification of native instructions Created binary instrumentation and translation systems CPU/Machine virtualization Each process feels like it has its own CPU Created by OS preemption and scheduler Memory virtualization Process feels like it has its own address space Created by MMU, configured by OS Storage virtualization (Input/Output) Logical view of disks “connected” to a machine External pool of storage

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 5 5 Application Level Virtualization Java Virtual Machine (JVM) Executes Java byte code (virtual instructions) Provides the implementation for the instruction set interpreter (or JIT compiler) Provides code verification, SEH, garbage collection Hardware access through underlying OS JVM Architecture Stack-based architecture No MMU Virtual hardware: PC, register-set, heap, method (code) areas Rich instruction set – Direct object manipulation, type conversion, exception throws Provides a runtime environment through JRE Other Examples:.NET CLI, Parrot (PERL 6)

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 6 6 CPU Virtualization

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 7 7 Virtual CPUs Each process feels like it has its own CPU But cannot execute privileged instructions (e.g., modify the MMU or the interval timer, halt the processor, access I/O) Created by OS preemption and scheduler Pseudo-machine with interpreted instructions 1966: O-code for BCPL 1973: P-code for Pascal 1995: Java Virtual Machine Run anywhere

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 8 8 Virtual Machines Machine virtualization Partition a physical computer to act like several real machines Migrate an entire OS + applications from one machine to another Early examples 1972: IBM System 370

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 9 9 HARDWARE KERNEL USER LEVEL LIBRARIES APPLICATIONS API Calls System Calls Instructions User Space Kernel Space Machines: Stacked Architecture

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 10 Possible Virtual Abstraction Levels Instruction Set Architecture Emulate the ISA in software –Interprets, translates to host ISA (if required) –Device abstractions implemented in software –Inefficient Optimizations: Caching? Code reorganization? Applications: Debugging, Teaching, multiple OS Hardware Abstraction Layer (HAL) Between “real machine” and “emulator” (maps to real hardware) Handling non-virtualizable architectures (scan, insert code?) Applications: Fast and usable, virtual hardware (in above too), consolidation, migration

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 11 Possible Abstraction Levels Operating System Level Virtualized SysCall Interface (may be same) May or may not provide all the device abstractions Easy to manipulate (create, configure, destroy) Library (user-level API) Level Presents a different subsystem API to application Complex implementation, if kernel API is limited User-level device drivers Application (Programming Language) Level Virtual architecture (ISA, registers, memory, …) Platform-independence (  highly portable) Less control on the system (extremely high-level)

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 12 Machine Virtualization Privileged vs. unprivileged instructions Regular applications use unprivileged instructions Easy to virtualize If regular applications execute privileged instructions, they trap VM catches the trap and emulates the instruction

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 13 Virtual Machine Monitor (VMM) Hypervisor- Program in charge of virtualization Arbitrates access to physical resources Presents a set of virtual device interfaces to each host Guest OS runs until: Privileged instruction traps System interrupts Exceptions (page faults) Explicit call: VMCALL (Intel) or VMMCALL (AMD)

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 14 Approaches Intel x86 arch doesn’t support trapping privileged instructions Two approaches to modifying OS to run on virtual machine: Binary translation (BT) –Scan instruction stream and replace instructions –Replace privileged instructions with something the VM can intercept. (VMWare approach) Paravirtualization –Don’t use non-virtualizable instructions (Xen approach) –Static design approach, paravirtualization support is designed before dynamic adaptation

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 15 Binary Translation and Binary Instrumentation

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 16 Translation Approaches Source instrumentation: –Instrument source programs Binary instrumentation: –Instrument executables directly Advantages for binary instrumentation Language independent Machine-level view Instrument legacy/proprietary software

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 17 When to instrument: Instrument statically Instrument dynamically Advantages for dynamic instrumentation No need to recompile or relink Discover code at runtime Handle dynamically-generated code Attach to running processes Instrumentation Approaches

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners Support for Binary Translation Easy-to-use Instrumentation: Uses dynamic instrumentation –Do not need source code, recompilation, post-linking Programmable Instrumentation: Provides rich APIs to write in C/C++ your own instrumentation tools (called Pintools) Multiplatform: Supports x86, x86-64, Itanium, Xscale Supports Linux, Windows, MacOS Robust: Instruments real-life applications: Database, web browsers, … Instruments multithreaded applications Supports signals Efficient: Applies compiler optimizations on instrumentation code

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 19 Pin (VM) Software Architecture of Binary Translation JIT Compiler Emulation Unit Virtual Machine (VM) Code Cache Instrumentation APIs Application Operating System Hardware Pin Pintool Address space

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 20 BT: Instrumentation Approaches JIT Mode Pin creates a modified copy of the application on-the-fly Original code never executes  More flexible, more common approach Probe Mode Pin modifies the original application instructions Inserts jumps to instrumentation code (trampolines)  Lower overhead (less flexible) approach

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 21 JIT-Mode Instrumentation Original code Code cache Pin fetches trace starting block 1 and start instrumentation 7’ 2’ 1’ Pin Exits point back to Pin

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 22 JIT-Mode Instrumentation Original code Code cache Pin transfers control into code cache (block 1) ’ 2’ 1’ Pin

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 23 JIT-Mode Instrumentation Original code Code cache 7’ 2’ 1’ Pin Pin fetches and instrument a new trace 6’ 5’ 3’ trace linking

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 24 Original Code A BC D FE A’ C’ F’ D’ Code Cache Hot Path, Found with Hardware E D B A C Original Code F JIT Code Model

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 25 Transformation cost: Start-up (initialization) overhead A black line represents a service request from the virtual machine. Space between adjacent black lines indicates time being spent in already compiled code paths. time Significant demands on the run-time system Light-weight application

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 26 Persistence ABCDC Original dynamic instruction stream A 1) A’B’C’D’C’A’JIT 2) A’B’C’D’C’A’JIT 1) A’B’C’D’C’A’JIT 2) A’B’C’D’C’A’ Traditional JIT Persistent JIT

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 27 Instrumentation Approaches JIT Mode Pin creates a modified copy of the application on-the-fly Original code never executes  More flexible, more common approach Probe Mode Pin modifies the original application instructions Inserts jumps to instrumentation code (trampolines)  Lower overhead (less flexible) approach

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 28 A Sample Probe A probe is a jump instruction that overwrites original instruction(s) in the application –Instrumentation invoked with probes –Pin copies/translates original bytes so probed functions can be called Entry point overwritten with probe: 0x400113d4:jmp 0x x400113d9:push %ebx Copy of entry point with original bytes: 0x : push %ebp 0x : mov %esp,%ebp 0x : push %edi 0x : push %esi 0x : jmp 0x400113d9 Original function entry point: 0x400113d4: push %ebp 0x400113d5: mov %esp,%ebp 0x400113d7: push %edi 0x400113d8: push %esi 0x400113d9: push %ebx

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 29 Popular VM Platforms Xen Runs under an OS and provides virtual containers for running other operating systems. Runs a subset of x86. Routes all hardware accesses to the host OS. Altris Software Virtualization Services Windows registry & directory tweaking Allows multiple instances of applications to be installed Microsoft Virtual Server Parallels VMWare

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 30 Overall Picture ISAHALOSLibraryPL Performance***** ***** Flexibility********* Development & Implementation ******** Degree of Isolation ********* *** (More stars are better)

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 31 Instruction Set Architecture Level Virtualization Technologies Emulation: Translates guest ISA to native ISA Emulates hardware specific IN/OUT instructions to mimic a device Translation Cache: Optimizes emulation by making use of similar recent instructions Code rearrangement Speculative scheduling (alias hardware) Issues Efficient Exception handling Self-modifying code

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 32 ISA Level Virtualization: Examples Bochs: Open source x86 emulator Emulates whole PC environment –x86 processor and most of the hardware (VGA, disk, keyboard, mouse, …) –Custom BIOS, emulation of power-up, reboot –Host ISAs: x86, PowerPC, Alpha, Sun, and MIPS Crusoe (Transmeta) “Code morphing engine” – dynamic x86 emulator on VLIW processor 16 MB “translation cache” Shadow registers: Enables easy exception handling QEMU: Full Implementation –Multiple target ISAs: x86, ARM, PowerPC, Sparc –Supports self-modifying code –Full-software and simulated (using mmap()) MMU User-space only: Useful for Cross-compilation and cross-debugging

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 33 HAL Virtualization Techniques Standalone vs. Hosted Drivers Host and VMM worlds I/O Protection Rings Multilevel privilege domains Handling “silent” fails Scan code and insert/replace artificial traps Cache results to optimize

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 34 VMware Architecture

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 35 Paravirtualization Traditional architectures do not scale Interrupt handling Memory management World switching Virtualized architecture interface Much simpler architectural interface Virtual I/O and CPU instructions, registers, … Portability is lost

Copyright © 2006, Intel Corporation. All rights reserved. Prices and availability subject to change without notice. *Other brands and names are the property of their respective owners 36 Examples Denali Simpler customized OS with no VM for network applications Xen Simpler port to commercial OS Exposes some “real” hardware, e.g. clock, physical memory address