Introduction to Virtual Machines Introduction Abstraction and - - PowerPoint PPT Presentation

introduction to virtual machines
SMART_READER_LITE
LIVE PREVIEW

Introduction to Virtual Machines Introduction Abstraction and - - PowerPoint PPT Presentation

Introduction to Virtual Machines Introduction Abstraction and interfaces Virtualization Computer system architecture Process virtual machines System virtual machines 1 EECS 768 Virtual Machines Abstraction Mechanism to


slide-1
SLIDE 1

1 EECS 768 Virtual Machines

Introduction to Virtual Machines

  • Introduction
  • Abstraction and interfaces
  • Virtualization
  • Computer system architecture
  • Process virtual machines
  • System virtual machines
slide-2
SLIDE 2

2 EECS 768 Virtual Machines

Abstraction

  • Mechanism to manage complexity in computer

systems.

  • Mechanism consists of

– partition the design of a system into levels – allow higher levels to ignore the implementation details of lower levels

  • In computer systems, lower levels are

implemented in hardware, and higher levels in software.

slide-3
SLIDE 3

3 EECS 768 Virtual Machines

Interfaces

  • An interface defines the communication

boundary between two entities

– hierarchical relationship – linear relationship

  • Software can run on any machine supporting a

compatible interface

PowerPC MacOS MacIntosh apps. x86 Linux Linux apps x86 Windows Windows apps.

slide-4
SLIDE 4

4 EECS 768 Virtual Machines

Interfaces – Advantages

  • Allows de-coupling of computer design tasks

– each component provides an abstraction of itself to the

  • utside world
  • Work on different components can progress

independently

  • Helps manage system complexity
slide-5
SLIDE 5

5 EECS 768 Virtual Machines

Interface – Disadvantages

  • Software compiled for one ISA will not run on

hardware with a different ISA

– powerPC binaries on an x86 machine ?

  • Even if ISA's are same Oses may differ

– MS–Windows applications Sun Solaris ?

MacOS MacIntosh apps x86 x86 Windows apps. Linux

slide-6
SLIDE 6

6 EECS 768 Virtual Machines

Interface – Disadvantages (2)

  • Binaries may not be optimized for the platform

they run on

– Intel Pentium binaries on AMD Athlon ?

  • Innovation may be inhibited by a fixed ISA

– hard to change instruction sets

  • Application software cannot directly exploit

microprocessor implementation features

– software supposed to be implementation-neutral !

slide-7
SLIDE 7

7 EECS 768 Virtual Machines

Virtualization

  • Removes some constraints imposed by system

interfaces, and increases flexibility

– improves availability of application software – removes the assumption of a single management regime, improving security and failure isolation

  • Provide a different view to a particular computer

resource

– not necessarily a simpler view

slide-8
SLIDE 8

8 EECS 768 Virtual Machines

Virtualization (2)

  • Virtualization constructs an isomorphism that

maps a virtual guest system to a real host.

Si S Si ' S

j'

Guest Host

V( S

i)

V( S

j

) e(S

i)

e '(Si')

j

slide-9
SLIDE 9

9 EECS 768 Virtual Machines

Virtualization (3)

  • Virtualization Vs. abstraction

– virtualization does not necessarily hide details

file file virtualization

slide-10
SLIDE 10

10 EECS 768 Virtual Machines

Virtual Machines

  • Concept of virtualization applied to the entire

machine.

  • A virtual machine is implemented by adding a

layer of software to a real machine to support the desired virtual machine’s architecture.

  • Virtualization

– mapping of virtual resources or state to real resources – use of real machine instructions to carry out actions specified by the virtual machine instructions

slide-11
SLIDE 11

11 EECS 768 Virtual Machines

Some Benefits of VMs

  • Flexibility
  • Portability
  • Isolation
  • Security
slide-12
SLIDE 12

12 EECS 768 Virtual Machines

Computer System Architecture

  • Architecture – functionality and appearance of a

computer system, but not the details of its implementation

  • Implementation – the actual embodiment of an

architecture

slide-13
SLIDE 13

13 EECS 768 Virtual Machines

Computer Architecture (2)

  • Computer systems are

built of levels of abstraction

– hierarchical abstraction – well-defined interfaces

I/O devices and Networking Controllers System Interconnect (bus) Controllers Memory Translation Execution Hardware Drivers Memory Manager Scheduler Operating System Libraries Application Programs Main Memory

Software Hardware

slide-14
SLIDE 14

14 EECS 768 Virtual Machines

The ISA Interface

  • Interface between

hardware and software

  • Important for

– OS developer

I/O devices and Networking System Interconnect (bus) Memory Translation Execution Hardware Application Programs Main Memory Operating System Libraries

slide-15
SLIDE 15

15 EECS 768 Virtual Machines

The ABI Interface

  • Application Binary

Interface (ABI)

– user ISA + system calls

  • Important for

– compiler writers

I/O devices and Networking System Interconnect (bus) Memory Translation Execution Hardware Application Programs Main Memory Operating System Libraries

slide-16
SLIDE 16

16 EECS 768 Virtual Machines

The API Interface

  • Application

Programming Interface (API)

– user ISA + library calls

  • Important for

– application programmers

I/O devices and Networking System Interconnect (bus) Memory Translation Execution Hardware Application Programs Main Memory Operating System Libraries

slide-17
SLIDE 17

17 EECS 768 Virtual Machines

Major Program Interfaces

  • ISA – supports all conventional software
  • ABI – supports application software only

System Calls User ISA System ISA

ISA

Application Software Operating System System Calls User ISA System ISA

ABI

Application Software Operating System

slide-18
SLIDE 18

18 EECS 768 Virtual Machines

Process Virtual Machines

  • Process virtual machine is capable of

supporting an individual process

– different guest and host ISA – couple at ABI level via runtime system

Virtualizing Software Application Process Machine OS Hardware

Guest Runtime Host

Application Process

Virtual Machine

slide-19
SLIDE 19

19 EECS 768 Virtual Machines

Process Virtual Machines (2)

  • Constructed at ABI level
  • Runtime manages guest process
  • Runtime communicates with

host OS

  • Guest processes may

intermingle with host processes

  • As a practical matter, binaries

built for same OS

  • Dynamic optimizers are a

special case

  • Examples: IA-32 EL, FX!32,

Dynamo

HOST OS

Disk

file sharing network communication guest process create host process guest process

runtime runtime

guest process

runtime

host process

slide-20
SLIDE 20

20 EECS 768 Virtual Machines

System Virtual Machines

  • System Virtual Machine capable of supporting

an OS with potentially many user processes

– couple at ISA level – eg., IBM VM/360, VMWare, Transmeta Crusoe

Hardware "Machine" OS Applications Virtualizing Software

Virtual Machine

OS Applications

Guest VMM Host

slide-21
SLIDE 21

21 EECS 768 Virtual Machines

PVM – Multiprogramming

  • PVM provided by a multi-process OS for each

concurrently executing application.

  • Combination of the OS system call interface,

and the user-level ISA.

  • Each process is given the illusion of having the

complete machine to itself.

slide-22
SLIDE 22

22 EECS 768 Virtual Machines

PVM – Emulators

  • Execute binaries compiled to a different

instruction set than that executed by the host’s hardware.

  • Interpretation

– low startup overhead – high steady-state per instruction emulation overhead

slide-23
SLIDE 23

23 EECS 768 Virtual Machines

PVM – Dynamic Translators

  • Run-time translation of blocks of source

instructions to equivalent target instructions.

– high start-up translation overhead – fast steady-state execution

  • Uses a code cache to

store translated blocks

  • f code for reuse.
  • e.g., Digital’s FX!32

system, Aries system, Intel IA-32 EL system

HP PA UNIX HP Apps

slide-24
SLIDE 24

24 EECS 768 Virtual Machines

PVM – Same ISA Binary Optimizers

  • Same source and target ISAs.
  • Main task is the optimization of the source

binary

– ABI level optimization – may also collect performance profiles – may also enhance security

  • e.g., Dynamo system, developed at Hewlett-

Packard.

slide-25
SLIDE 25

25 EECS 768 Virtual Machines

PVM – High Level Language VM

  • A HLL is designed for VM execution

– minimize hardware-specific and OS-specific features that could compromise portability

HLL Program Intermediate Code Memory Image Object Code (ISA) Compiler front-end Compiler back-end Loader HLL Program Portable Code (Virtual ISA ) Host Instructions

  • Virt. Mem. Image

Compiler VM loader VM Interpreter/Translator Traditional HLL VM

slide-26
SLIDE 26

26 EECS 768 Virtual Machines

PVM – High Level Language VM

  • Binary class files are distributed

– ISA part of class file (no real implementation)

  • OS interaction via API
  • e.g., Java, Microsoft CLI

Sparc Workstation Java Binary Classes x86 PC Apple Mac VM implementation VM implementation VM implementation

Java VM Architecture

slide-27
SLIDE 27

27 EECS 768 Virtual Machines

Linux process

Classic System Virtual Machine

  • Original meaning of the term virtual machine

– all guest and host software use the same ISA – VMM runs on bare hardware (most privileged mode) – VMM intercepts and implements all the privileged

  • perations for the guest OS.

Win process HOST PLATFORM

virtual network communication

Guest OS (Windows) Win process Win process Guest OS2 (Linux)

VMM

Linux process Linux process

slide-28
SLIDE 28

28 EECS 768 Virtual Machines

Hosted System Virtual Machine

  • Virtualizing software is built on top of an

existing host OS.

  • Advantages

– installation is like installing application programs – host OS provides device driver support

  • Drawbacks

– less efficient

slide-29
SLIDE 29

29 EECS 768 Virtual Machines

Whole System VMs

  • Different ISA for guest and host systems.

– both application and OS code require emulation

  • Implemented by placing the VMM and the

guest software on top of a conventional host OS running on the hardware

  • e.g., Virtual PC
slide-30
SLIDE 30

30 EECS 768 Virtual Machines

Codesigned Virtual Machines

  • VMs designed to enable innovative ISAs and/or

hardware implementations for improved performance, power efficiency, etc.

  • Similar hardware virtualization is common for

microprocessors, such as Pentium IV.

  • Software VM is part of the hardware design

– applications/OS never directly execute native ISA instructions

  • e.g., Transmeta Crusoe processor
slide-31
SLIDE 31

31 EECS 768 Virtual Machines

VM Taxonomy

Multiprogrammed Systems HLL VM

Java VM MS CLI

Codesigned VM

Transmeta Crusoe

same ISA different ISA

Process VMs System VMs

Whole System VM

Virtual PC for Mac

different ISA same ISA Classic System VM

IBM VM/370

Hosted VM

VMware

Dynamic Binary Optimizers

Dynamo

Dynamic Translators

IA-32EL, FX!32