1 / 20

Virtual machine systems: simulators for multiple copies of a machine on itself.

Virtual Machine - Introduction. Virtual machine systems: simulators for multiple copies of a machine on itself. Virtual machine (VM): the simulated machine. Virtual machine monitor (VMM): the simulator software. Pure software simulator is too slow; Direct hardware execution is necessary

samara
Download Presentation

Virtual machine systems: simulators for multiple copies of a machine on itself.

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 Machine - Introduction • Virtual machine systems: simulators for multiple copies of a machine on itself. • Virtual machine (VM): the simulated machine. • Virtual machine monitor (VMM): the simulator software. • Pure software simulator is too slow; Direct hardware execution is necessary • Complicated when OS involved; especially with multiple OS; build separate VMM layer CDA6159fa07 peir

  2. Virtual Machine - Introduction • Principal characteristics of the original (IBM 360) architectures for which virtual machine systems were developed was the dual-state hardware organization with a privileged and non-privileged mode. • Privileged software nucleus (kernel) • Extended machine: set of non-privileged instructions together with the supervisory calls. • VMM runs on privileged mode, while guest OS runs on non-privileged mode CDA6159fa07 peir

  3. Survey of Virtual Machine ResearchIEEE Computer, 1974

  4. Conventional and Virtual Machine Organizations

  5. Flexible Virtual Machine Model

  6. The Renaissance of Virtualization- X86 Prospective from VMware • 1970s: Virtual machines first used • 1990s: • x86 becomes prominent server platform, not design for virtualization • No vertical integration in x86 • Lack of enterprise features in commodity OSs • 1999: VMWare first product to virtualize x86 • 2006: AMD and Intel offer hardware support CDA6159fa07 peir

  7. Virtual Machine - Performance • Extra resources needed: main memory, processor cycles. • Sources of overhead: • Maintaining the status of the virtual processor. • Support of privileged instructions. • Support of paging within virtual machines. • Console functions. • A problem: resource allocation algorithms in operating system (these are meant for managing real resources, but the virtual resources may not correspond precisely to real resources). CDA6159fa07 peir

  8. Virtual Machine - Applications • Privileged software development, test and diagnostic functions, multiple operating system execution concurrently with production uses of the system. • Retrofit old operating systems with new features. • Improved testing of privileged software. • Testing of computer network software on a single physical machine. • Debugging and performance monitoring tools. • Software reliability through isolation. • Data security. CDA6159fa07 peir

  9. Basic Computer Systems

  10. Hardware / Software Interface 3: “system” ISA: I/O, memory mgmt, CPU intercept & emulate 4: “user” ISA: ALU, branch, load/store direct execution

  11. Basic VM Architecture • Classic VMs are enabled by “Virtual Machine Monitor” (VMM) software – VMM may be in total control of the underline physical machine • No O/S below the VMM – Or, VMM may share the physical machine with a “host” operating system • VMM runs on top of host O/S (with user-level processes, as well as with kernel code, e.g. modules) CDA6159fa07 peir

  12. Classic VMM

  13. VMM Integrated with Host OS • Advantages: • Simple to install VMM, hosted OS accommodate rich I/O devices, take advantage hosted OS’ resource management • Disadvantages: • Performance overhead, no performance isolation

  14. Fundamental task of VM monitor • Present a “replica” of the interfaces to Hardware • provided by physical machine to each VM – Interface to processor (i.e. instruction set) – Interface to memory (i.e. use physical memory addresses) – Interface to I/O devices (e.g. memory mapped I/O, interruptions) * Different views of physical I/O device possible; e.g. a SCSI physical disk may be viewed as many virtual IDE disks CDA6159fa07 peir

  15. VMM – Processor Virtualization • Analogy with operating systems: – Most application instructions execute directly on processor (O/S does not see them) – Those that require access to shared resources are handled indirectly by calling the O/S via system calls • VMM: – Most application instructions execute directly on processor (VMM does not see them) – Those that require privileged processor access are handled indirectly – they are trapped and emulated by the VMM CDA6159fa07 peir

  16. Challenges and Techniques • X86 architecture is not designed for virtualization • POPF (pop CPU flags from stack) set / clear interrupt-disable flag; does not trap in user mode in guest OS • Paravirtualization • Replace nonvirtualizable instructions with virtualized equivalent • OS must be ported in order to run in a virtual machine • Disco (for MIPS) changes MIPS interrupt flag from a privileged register to a special memory location

  17. VMM - Memory Virtualization • Aided by processor’s ability to support virtual memory • One more level of indirection is implemented – O/S: application loads/stores virtual address; map to physical addresses of physical machine – Classic VM: application loads/stores virtual address; map to physical address of the VM; then map to physical address of physical machine CDA6159fa07 peir

  18. Page Replication and Page Sharing in Disco

  19. VMM - I/O Virtualization • Hosted versus non-hosted – Non-hosted: VMM must implement drivers for each device Since it interfaces directly with hardware; must go through VMM, incur overhead – Hosted: VMM may build on top of existing device drivers of host O/S • E.g. VMware: low-level I/O accesses to virtual disk are mapped into accesses to a regular file of the host via system calls • Host O/S drivers, in turn, maps to I/O accesses to physical disk

More Related