Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture on High Performance Processor Architecture (CS05162)

Similar presentations


Presentation on theme: "Lecture on High Performance Processor Architecture (CS05162)"— Presentation transcript:

1 Lecture on High Performance Processor Architecture (CS05162)
Introduction to Virtual Machines An Hong Fall 2007 University of Science and Technology of China Department of Computer Science and Technology CS258 S99

2 Outline System Layers, Interfaces, and VM classes
Motivations for using VMs Virtualization Taxonomy summary Process VMs System VMs Summary Course Introduction 2018/12/8 CS of USTC AN Hong

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

4 Disadvantages and Limitations ?
Application SW still depends on ISA and OS interfaces OS still depends on ISA Suboptimal performance across interfaces, get locked into interface 2018/12/8 CS of USTC AN Hong

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

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

7 Examples 2018/12/8 CS of USTC AN Hong

8 VM is a Computer Architecture in a broad sense
2018/12/8 CS of USTC AN Hong

9 VM is a Computer Architecture in a broad sense
软件接口 应用程序与标准库函数之间的接口(接口2) 操作系统边界的接口(接口3) 硬件接口 描述地址转换的硬件存储器体系结构(接口9) 操作系统与I/O设备通信接口(接口4、8、10、11和13) 驱动I/O设备控制器信号的I/O体系结构(接口11) 描述离开处理器的存储访问信号的接口(接口12) 描述到达DRAM芯片的信号的存储器接口(接口14) 最感兴趣的是硬件/软件分界处或附近的接口 2018/12/8 CS of USTC AN Hong

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

11 Taxonomy Overview Same/different ISA at top and bottom 2018/12/8
CS of USTC AN Hong

12 Process VMs vs. System VMs
Process level VMs provide ABI to application System VMs provide ISA to OS and applications 2018/12/8 CS of USTC AN Hong

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

14 Process VMs (1) Multiprogramming Note: replication can go both ways
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 Note: replication can go both ways multiprocessor appears as single environment clusters, grid computing 2018/12/8 CS of USTC AN Hong

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

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

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

18 System VMs (1) Classic System VMs 过去:多用户之间分时共享硬件
现在:多用户之间相互隔离;支持多个不同的操作系统 VMM (Virtual Machine Monitor) provides replication and resource management VMM可以访问并管理所有硬件资源。客户机操作系统和编译到这个操作系统上的应用程序都由VMM管理。 VMM以一种完全透明的方式,拦截并执行所有客户机操作系统发出的与硬件资源交互的动作。 实现的方法是,构建一个这样的系统,当客户机操作系统要执行一个特定的操作时,例如直接访问共享硬件资源的特权指令,这个操作由VMM来解释并检查正确性,再由VMM替客户机执行。客户机软件不知道VMM是在后台做这些事情的。 similar to what an OS does for processes sits on hardware (super)privileged mode 2018/12/8 CS of USTC AN Hong

19 System VMs (1) 优点: 缺点: 它以基本平等的方式为所有客户机系统提供服务
flexibility, utilization, isolation 缺点: 在安装它之前,要求删除硬件上现有的操作系统,先装上VMM,然后再在其上安装客户机操作系统。 I/O设备驱动器在安装VMM时必须可用,因为VMM要求与I/O设备直接交互。 2018/12/8 CS of USTC AN Hong

20 System VMs (2) Hosted System VMs
Like classic system VM, but operates within process space 在现有的主机操作系统上构造虚拟软件——构成一台所谓的宿主虚拟机(hosted VM)。宿主虚拟机的安装过程类似于应用程序的安装。此外,虚拟软件可以依赖主机操作系统提供设备驱动和其他低层服务,不需要VMM的支持。这种虚拟机的缺点是会丧失一些效率,因为当请求操作系统服务时要通过更多的软件层次。 E.g. VMware 2018/12/8 CS of USTC AN Hong

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

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

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

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

25 2018/12/8 CS of USTC AN Hong

26 Summary 虚拟机被分为两个主要类型:进程虚拟机和系统虚拟机 进程虚拟机:为应用提供ABI,ABI被虚拟化
系统虚拟机支持完整的ISA:包括用户指令和系统指令 在这个分类法中更细的划分基于客户机与主机是否使用相同的ISA 进程虚拟机:为应用提供ABI,ABI被虚拟化 客户机与主机指令集相同 多道程序系统,大多数现有的系统已经支持 相同指令集下的二进制代码优化器,仅仅优化客户指令,然后在本地执行 客户机与主机指令集不同 动态二进制代码翻译器 HLL虚拟机 2018/12/8 CS of USTC AN Hong

27 Summary 系统虚拟机:为操作系统和应用提供完整的ISA,ISA被虚拟化 客户机与主机指令集相同 “标准”系统虚拟机 宿主虚拟机
在这些虚拟机中,目的是要提供可复制的、隔离的系统环境。标准和宿主虚拟机基本的区别在于VMM的实现,而不是他们为用户提供的功能 客户机与主机指令集不同 完整系统虚拟机,牺牲性能和功耗,获取兼容性 协同设计虚拟机,性能和功耗是主要追求目标 2018/12/8 CS of USTC AN Hong


Download ppt "Lecture on High Performance Processor Architecture (CS05162)"

Similar presentations


Ads by Google