+ All Categories
Home > Documents > Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter...

Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter...

Date post: 31-Dec-2015
Category:
Upload: damian-morrison
View: 217 times
Download: 0 times
Share this document with a friend
Popular Tags:
23
Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1
Transcript
Page 1: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-1

Introduction to Virtual Machines

From “Virtual Machines”

Smith and NairChapter 1

Page 2: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-2

Two fundamental notions incomputer system design

Levels of Abstraction … ….separated by well-defined Interfaces

Keys to managing complexity in computer systems.

Page 3: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-3

Abstraction

Abstraction allows lower levels of design to be ignored/simplified while designing higher levels.

E.g. Details of hard disk abstracted by operating system into multiple variable sized partitions and their file systems.

Disadvantage: Sometimes low-level details are necessary to optimize for performance. E.g. File systems might use better layout if they knew the disk geometry.

Page 4: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-4

Interfaces

Allow computer design tasks to be decoupled so that different development teams can work independently at different levels of abstraction.

E.g. Instruction set: Intel and AMD implement the same IA-32 (x86) instruction set interface. Software designers don’t need to worry about their

different implementations.

Disadvantage: Components designed for one interface cannot work on another E.g. x86 vs IBM PowerPC Diversity of interfaces can be restrictive for

applications.

Page 5: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-5

Virtualization

Provides a way to increase flexibility.

Real system (and its interfaces) appear to be a set of virtual systems (and virtual interfaces).

Virtualization vs. abstraction Virtualization does not necessarily hide the

level of details of the real system

Page 6: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-6

Example: Disk Virtualization

RealDisk

File 1 File 2

Interface

Virtualization

VirtualDisk 1

VirtualDisk 2

Page 7: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-7

Virtual Machines

Same concept as disk virtualization in last slide Implemented by adding layers of software to

the real machine to support the desired VM architecture. E.g. Virtual PC on Apple MAC/PowerPC emulates

Windows/x86. Uses:

Multiple OSes on one machine Isolation, Enhanced security Platform emulation On-the-fly optimization Realizing ISAs not found in physical machines

Page 8: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-8

Virtualization – Isomorphism Maps a virtual guest system to a real host

system.

Si Si’

Sj’Si’

V(Si) V(Sj)

e’(Si’)

e(Si)

Guest

Host

Page 9: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-9

Computer Architecture

User ISA : 7System ISA : 8Syscalls : 3ABI : 3, 7API : 2,7

Page 10: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-10

Machine Interfaces

Application Binary Interface ISA Interface(Process View) (OS View)

Page 11: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-11

Two Types of VMs

Process VMs

System VMs

Page 12: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-12

Process Virtual Machine

•Virtualizing software translates instructions from one platform to another.

•Helps execute programs developed for a different OS or different ISA.

•VM terminates when guest process terminates.

Page 13: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-13

System Virtual Machine

Provides a complete system environment OS+user processes+networking+I/O+display+GUI Lasts as long as host is alive

Page 14: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-14

Virtual Machine Applications

Emulation: Mix-and-match cross-platform portability Optimization: Usually done with emulation for platform-specific performance

improvement Replication: Multiple VMs on single platform Composition: form more complex flexible systems

Emulation &Optimization

Replication Composition

Page 15: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-15

Types of Process Virtual Machines Multiprogramming

Standard OS syscall interface + instruction set Can support multiple processes with its own address space and virtual machine view.

Emulators Support one instruction set on hardware designed for another

Interpreter: • Fetches, decodes and emulates the execution of individual source instructions. Can be slow.

Dynamic Binary Translator: • Blocks of source instructions converted to target instructions.• Translated blocks cached to exploit locality.

Alpha ISA

Windows NT Runtime

IA-32 Windows APP

Digital FX!32System

Page 16: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-16

Types of Process Virtual Machines (contd) Same ISA Binary Optimizers

Optimize code on the fly Same as emulators except source and target ISAs are the

same.

High-Level Language VMs Virtual ISA (bytecode) designed for platform independence Platform-dependent VM executes virtual ISA E.g. Sun’s JVM and Microsoft’s CLI (part of .NET) Both are stack-based VMs that run on register-based m/c.

Page 17: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-17

Types of System VMs

Originally developed for large mainframes

Today: Secure way of partitioning major software systems

on a common platform Ability to run multiple OSes on one platform

Platform replication provided by VMM VMM controls access to hardware resources When guest OS performs a privileged operation,

VMM intercepts it, checks for correctness and performs the operation.

Transparent to guest OS.

Page 18: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-18

Classic System VMs

Try to execute natively on the host ISA VMM directly controls hardware Provides all device drivers Traditional mainframe model

Page 19: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-19

Hosted VMs Similar to classic system VM

Operates in process space Relies on host OS to provide drivers E.g. VMWare

Page 20: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-20

Whole System VMs: Emulation Host and Guest ISA are different Hosted VM + emulation So emulation is required E.g. Virtual PC (Windows on MAC)

Page 21: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-21

Co-designed VMs

Performance improvement of existing ISA Customized microarchitecture and ISA at

hardware level Native ISA not exposed to applications VMM

co-designed with native ISA Part of native hardware implementation

Emulation/translation E.g. Transmeta Crusoe

Native ISA based on VLIW Guest ISA = x86 Goal power savings

Page 22: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-22

Taxonomy

Page 23: Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.

Introduction 1-23

Versatility

Java App

Linux IA-32

Windows IA-32

Crusoe VLIW

JVM

VMWare

Code Morphing


Recommended