1 / 35

Virtual Machines (Introduction to Virtual Machines)

Virtual Machines (Introduction to Virtual Machines). Chihun Kim (chihun@aces.snu.ac.kr). Contents. Abstraction, Virtualization of Computer System Architecture, Implementation Layers What is VM and Where is VM? What kind of VM Process VM System VM Example of Complex VM Usage

betty_james
Télécharger la présentation

Virtual Machines (Introduction to Virtual Machines)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Virtual Machines(Introduction to Virtual Machines) Chihun Kim (chihun@aces.snu.ac.kr) Virtual Machines

  2. Contents • Abstraction, Virtualization of Computer System • Architecture, Implementation Layers • What is VM and Where is VM? • What kind of VM • Process VM • System VM • Example of Complex VM Usage • Rest of the book Virtual Machines

  3. Abstraction, Virtualization of Computer System • Modern computer system is very complex • Hundreds of millions of transisters • Interconnected high-speed I/O devices • Networking infrastructures • Operating systems, libraries, applications • Graphics and networking softwares • To manage this complexity • Levels of Abstractions • seperated by well-defined interfaces • Virtualizations Virtual Machines

  4. Abstraction, Virtualization of Computer System • Levels of Abstraction • Allows implementation details at lower levels of design to be ignored or simplified • Each level is seperated by well-defined interfaces • Design of a higher level can be decoupled from the lower levels Virtual Machines

  5. Component A Component A Component A Interface A Interface A Interface B Interface B Abstraction, Virtualization of Computer System • Disadvantage • Components designed to specification for one interface will not work with those designed for another. Virtual Machines

  6. BB BB’ Resource AA isomorphism Resource A B B’ Abstraction, Virtualization of Computer System • Virtualization • Similar to Abstraction but doesn’t always hide low layer’s details • Real system is transformed so that it appears to be different • Virtualization can be applied not only to subsystem, but to an Entire Machine→ Virtual Machine Virtual Machines

  7. Abstraction, Virtualization of Computer System • Virtualization Applications or OS Application uses virtual disk as Real disk Virtualized Disk Virtualization File File Abstraction Real Disk Virtual Machines

  8. Application Programs Libraries Operating System ABI Drivers Memory Manager Scheduler API Execution Hardware ISA Memory Translation System Interconnect (Bus) Controllers Controllers IO Devices, Networking Main Memory Architecture, Implementation Layers • Architecture • Functionality and Appearance of a computer system but not implementation details • Level of Abstraction = Implementation layer • ISA, ABI, API Virtual Machines

  9. Architecture, Implementation Layers • Implementation Layer : ISA • Instruction Set Architecture • Divides hardware and software • Concept of ISA originates from IBM 360 • IBM System/360 Model (20, 40, 30, 50, 60, 62, 70, 92, 44, 57, 65, 67, 75, 91, 25, 85, 95, 195, 22) : 1964~1971 • Various prices, processing power, processing unit, devices • But guarantee a software compatibility • User ISA and System ISA Virtual Machines

  10. Architecture, Implementation Layers • Implementation Layer : ABI • Application Binary Interface • Provides a program with access to the hardware resource and services available in a system • Consists of User ISA and System Call Interfaces Virtual Machines

  11. Architecture, Implementation Layers • Implementation Layer : API • Application Programming Interface • Key element is Standard Library ( or Libraries ) • Typically defined at the source code level of High Level Language • clib in Unix environment : supports the UNIX/C programming language Virtual Machines

  12. What is a VM and Where is the VM? • What is “Machine”? • 2 perspectives • From the perspective of a process • ABI provides interface between process and machine • From the perspective of a system • Underlying hardware itself is a machine. • ISA provides interface between system and machine Virtual Machines

  13. Application Programs Application Software Libraries System calls Operating System Drivers Memory Manager Scheduler User ISA Execution Hardware Memory Translation ABI Machine System Interconnect (Bus) Controllers Controllers IO Devices, Networking Main Memory What is a VM and Where is the VM? • Machine from the perspective of a process • ABI provides interface between process and machine Virtual Machines

  14. Application Programs Application Software Libraries Operating System Operating System Drivers Memory Manager Scheduler System ISA Execution Hardware User ISA Memory Translation ISA System Interconnect (Bus) Machine Controllers Controllers IO Devices, Networking Main Memory What is a VM and Where is the VM? • Machine from the perspective of a system • ISA provides interface between system and machine Virtual Machines

  15. What is a VM and Where is the VM? • Virtual Machine is a Machine. • VM virtualizes Machine Itself! • There are 2 types of VM • Process-level VM • System-level VM • VM is implemented as combination of • Real hardware • Virtualizing software Virtual Machines

  16. Application Process Application Software Guest Virtualizing Software System calls System calls ABI OS Runtime User ISA User ISA ABI Machine Hardware Host What is a VM and Where is the VM? • Process VM • VM is just a process from the view of host OS • Application on the VM cannot see the host OS Virtual Machine Virtual Machines

  17. Application Software Operating System Applications Guest System ISA User ISA ISA OS Machine Virtualizing Software Runtime Host Hardware What is a VM and Where is the VM? • System VM • Provides a system environment Virtual Machine Virtual Machines

  18. Applications Other Host Applications Guest OS Virtualizing Software (VMWare) Host OS Hardware What is a VM and Where is the VM? • System VM • Example of a System VM as a process • VMWare Virtual Machines

  19. What kind of VMs • Process Virtual Machines • Multiprogramming • Emulators and Dynamic Binary Translators • Same-ISA Binary Optimizers • HLL (High Level Language) Virtual Machines • System Virtual Machines • Whole-System Emulations • Codesigned Virtual Machines Virtual Machines

  20. What kind of VMs (Process VM) • (1) Multiprogramming • Process VM • First and most common virtual machine • We don’t think of this as a VM • Each user is given the illusion of having a complete machine Virtual Machines

  21. IA-32 Windows Application Windows OS (for Alpha) VM Runtime Alpha ISA What kind of VMs (Process VM) • (2) Emulators and Dynamic Binary Translators • Emulates one instruction set on hardware designed for another • As a practical matter, guest and hosts are often the same • Example: FX!32, Aries system FX!32 : guest and host have same ISA Virtual Machines

  22. What kind of VMs (Process VM) • Components of Aries system • HP, “PA-RISC to IA-64: Transparent Execution, No Recompilation”, Cindy Zheng, Carol Thompson, IEEE 2000 • Program binary for PA-RISC can run on the IA-64 hardware • PA-RISC is a microprocessor architecture developed by HP. “PA” stands for Precision Architecture. • Sometmies, “PA” is considered to stand for “Palo Alto”, the location of HP’s headquaters. (from Wikipedia) HP PA-RISC 7300LC Virtual Machines

  23. What kind of VMs (Process VM) • Implemented with • Interpreter or Binary Translator • Interpreter • Emulates the execution of individual source instruction • Very slow ( requires 10x processing power ) • Binary Translator • Block of source instructions are converted to target instructions • Translated blocks are stored in VM’s memory • Static / dynamic schemes Virtual Machines

  24. What kind of VMs (Process VM) • (3) Same-ISA Binary Optimizers • Source ISA and Target ISA are same • Binary optimizer collects a profile and use this information to optimize application on the fly • Example: HP Dynamo Virtual Machines

  25. What kind of VMs (Process VM) • How HP Dynamo works • HP, “Transparent Dynamo Optimization: The Design and Implementation of Dynamo”, Vasanth Bala, Evelyn Duesterwald, Sanjeev Banerjia, 1999 Virtual Machines

  26. What kind of VMs (Process VM) • (4) HLL (High Level Language) Virtual Machines • Main goal is • platform-independence of a application • Full cross-platform portability • Binary class files are distributed • ISA is part of binary class format • Higher level of abstraction • Higher level Virtual ISA • OS is abstracted as standard libraries (API) Virtual Machines

  27. HLL Program HLL Program Compiler frontend Compiler Intermediate Code Portable Code Distribution Compiler backend VM loader Object Code Virtual Memory Image Distribution Loader VM Interpreter / Compiler Memory Image Host Instructions (a) Conventional System (b) HLL VM environment What kind of VMs (Process VM) • Conventional System and HLL VM • Different layer of distribution Virtual Machines

  28. Java Source Java Binary Classes Java VM Implementation Java VM Implementation Java VM Implementation Sparc Workstation X86 PC Apple Mac What kind of VMs (Process VM) • Example : Java Virtual Machines

  29. What kind of VMs (System VM) • (1) Whole-System Emulations • Host and guest systems don’t have a common ISA • Apple PowerPC-based system and Windows PC • Sun servers and Windows PC • Both applications and OS code require emulation • Via binary translation • Example: VMWare • Challenges • If the properties of hardware resources are significantly different • Emulation of ISA features such as virtual memory management or trap handling Virtual Machines

  30. Applications Other Host Applications Guest OS Virtualizing Software (VMWare) Host OS Hardware What kind of VMs (System VM) • Example : VMWare Virtual Machines

  31. What kind of VMs (System VM) • (2) Codesigned Virtual Machines • Primary goals are • Performance improvement and power efficiency • Uses new ISA and hardware features to execute other ISA • VM is a part of hardware design • Includes a binary translator or dynamic optimizer • Example: Transmeta Crusoe, IBM Daisy Applications OS Old ISA Codesigned VM New ISA New hardware Virtual Machines

  32. What kind of VMs (System VM) • Transmeta Crusoe • Transmeta Corp., “The Technology Behind CrusoeTM Processors : Low-power x86-compatible processors implemented with Code MorphingTM software”, Alexdander Klaiber, 2000 Transmeta Crusoe Translated from x86 ISA to Crusoe VLIW ISA by code morphing software Virtual Machines

  33. What kind of VMs (System VM) • IBM Daisy : ISCA’97 • Dynamically Architected Instruction Set from Yorktown http://researchweb.watson.ibm.com/daisy/ Virtual Machines

  34. Java Application JVM Linux IA-32 VMWare Windows IA-32 Code Morphing Crusoe VLIW Example of Complex Composition Virtual Machines

  35. The Rest of this Textbook Virtual Machines

More Related