Lecture on High Performance Processor Architecture CS 05162

  • Slides: 27
Download presentation
Lecture on High Performance Processor Architecture (CS 05162) Introduction to Virtual Machines An Hong

Lecture on High Performance Processor Architecture (CS 05162) Introduction to Virtual Machines An Hong han@ustc. edu. cn Fall 2007 University of Science and Technology of China Department of Computer Science and Technology CS of USTC AN Hong

Outline n System Layers, Interfaces, and VM classes n Motivations for using VMs n

Outline n System Layers, Interfaces, and VM classes n Motivations for using VMs n Virtualization n Taxonomy summary n Process VMs n System VMs n Summary n Course Introduction 2022/1/20 CS of USTC AN Hong 2

Standard System Layers n ISA − 提供硬件与软件的接口 − e. g. : Intel IA-32, MIPS,

Standard System Layers n ISA − 提供硬件与软件的接口 − e. g. : Intel IA-32, MIPS, Alpha, SPARC n OS − 提供系统调用接口 − e. g. MS Windows, Linux, Solaris n Benefits − decoupled design tasks − software reuse across varying hardware configurations and generations n Starting point for all virtual machines in this course 2022/1/20 CS of USTC AN Hong 3

Disadvantages and Limitations ? n Application SW still depends on ISA and OS interfaces

Disadvantages and Limitations ? n Application SW still depends on ISA and OS interfaces n OS still depends on ISA n Suboptimal performance across interfaces, get locked into interface 2022/1/20 CS of USTC AN Hong 4

Motivations for using VMs n VMs for Flexibility − Software perspective: want ability to

Motivations for using VMs n VMs for Flexibility − Software perspective: want ability to run on all machines l reach more customers l move code between networked computers − Hardware perspective: want ability to run all programs l server consolidation(整合) l legacy applications l cross-platform software development 2022/1/20 CS of USTC AN Hong 5

Motivations for using VMs n VMs for Performance − Optimize just in time l

Motivations for using VMs n VMs for Performance − Optimize just in time l The more you know, the more you can optimize − Isolate faults and security risks l Many server images more stable than single server − Increase utilization of resources l adjust allocations dynamically l reduce fragmentation n VMs for Multicore? 2022/1/20 CS of USTC AN Hong 6

Examples 2022/1/20 CS of USTC AN Hong 7

Examples 2022/1/20 CS of USTC AN Hong 7

VM is a Computer Architecture in a broad sense 2022/1/20 CS of USTC AN

VM is a Computer Architecture in a broad sense 2022/1/20 CS of USTC AN Hong 8

ISA and ABI n Interface at the top − ABI (Application Binary Interface,应用二进制代码接口) −

ISA and ABI n Interface at the top − ABI (Application Binary Interface,应用二进制代码接口) − ISA (Instruction Set Architecture,指令集体系结构) − C. P. API(Application Program Interface,应用程序接口) n ISA separates hardware from rest n ABI separates processes from rest 2022/1/20 CS of USTC AN Hong 10

Taxonomy Overview n Same/different ISA at top and bottom 2022/1/20 CS of USTC AN

Taxonomy Overview n Same/different ISA at top and bottom 2022/1/20 CS of USTC AN Hong 11

Process VMs vs. System VMs n Process level VMs provide ABI to application n

Process VMs vs. System VMs n Process level VMs provide ABI to application n System VMs provide ISA to OS and applications 2022/1/20 CS of USTC AN Hong 12

VM Puzzles n (a) Emulating one instruction set with another n (b) Replicating a

VM Puzzles n (a) Emulating one instruction set with another n (b) Replicating a virtual machine so that multiple operating systems can be supported simultaneously n (c) Composing virtual machine software to form a more complex, flexible system 2022/1/20 CS of USTC AN Hong 13

Process VMs (1) n Multiprogramming − same ISA, same OS − replicates ABI so

Process VMs (1) n Multiprogramming − same ISA, same OS − replicates ABI so that each process thinks it has its own machine − standard in “modern” OS − can argue whether to call this a VM n Note: replication can go both ways − multiprocessor appears as single environment − clusters, grid computing 2022/1/20 CS of USTC AN Hong 14

Process VMs (2) n “Emulation” and “Dynamic Binary Translation” − OS is same, ISA

Process VMs (2) n “Emulation” and “Dynamic Binary Translation” − OS is same, ISA is different − better known as “interpretation” and “compilation” − E. g. Digital FX!32 n Dynamic Optimizers − same OS and ISA − performance is purpose − E. g. HP Dynamo 2022/1/20 CS of USTC AN Hong 15

Process VMs (3) n High-level VMs − Use synthetic ISA l P-code l Java

Process VMs (3) n High-level VMs − Use synthetic ISA l P-code l Java bytecode − Maximal platform independence l what about OS calls? − High performance penalty? l what about just-in-time compilation? 2022/1/20 CS of USTC AN Hong 16

Process VMs (4) n This combination is left out by taxonomy: − OS is

Process VMs (4) n This combination is left out by taxonomy: − OS is different, ISA is same − for example, run Windows x 86 applications in a Linux x 86 environment (e. g. WINE) − Don’t know specific term for this VM type ? ? 2022/1/20 CS of USTC AN Hong 17

System VMs (3) n Whole System VMs − ISA is different − no ‘native’

System VMs (3) n Whole System VMs − ISA is different − no ‘native’ execution possible. Complete emulation/translation required. − Usually done as a hosted VM 2022/1/20 CS of USTC AN Hong 21

System VMs (4) n Co-Designed VMs − use synthetic custom ISA at bottom −

System VMs (4) n Co-Designed VMs − use synthetic custom ISA at bottom − goal: reconcile diverging requirements between ISA and microarchitecture − no ‘native’ execution possible − Emulation/translation l can be joint effort by hardware and software l can be made completely transparent − E. g. Transmeta Crusoe 2022/1/20 CS of USTC AN Hong 22

Finally: VMs on top of VMs 进程虚拟机 (IA-32 ISA) 系统虚拟机 (IA-32 ISA) 协同设计虚拟机: Transmeta

Finally: VMs on top of VMs 进程虚拟机 (IA-32 ISA) 系统虚拟机 (IA-32 ISA) 协同设计虚拟机: Transmeta 的code morphing软件 2022/1/20 CS of USTC AN Hong 23

Discussion questions n Is this taxonomy good? − too broad or too narrow? −

Discussion questions n Is this taxonomy good? − too broad or too narrow? − too simple or too complicated? n What VM types are most relevant? n How to implement a VM n Would a proliferation of VMs change − ABI’s? − ISA’s? − OS’s? 2022/1/20 CS of USTC AN Hong 24

2022/1/20 CS of USTC AN Hong 25

2022/1/20 CS of USTC AN Hong 25