a toy virtual machine project
DESCRIPTION
TRANSCRIPT
Project BackgroundProject Scope
Project Achievements
Virtual Machine Project
Presented by Yan Dacong
School of Software, SJTU
September 25, 2008
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Agenda
1 Project Background
2 Project Scope
3 Project Achievements
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Project Background
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Why study virtual machines?
Ubiquitous Applications
Personal & CommercialDesktop & Workstation
Challenging & Exciting
Operating System CompatibilityComputer Architecture Compatibility
Promising future
Trend: servers much stronger computation abilityMake full use via VM Technology
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Project Scope
What we are doing in this PRP:
Get acquaintance with basic concepts of virtual machinesAcquire familiarity with applications of virtual machinesMaster the basic techniques of virtual machine implementationDevelop a process virtual machine for MIPS
What we are NOT doing in this PRP:
Implement a full-scale system virtual machineDevelop a brand-new virtual machine model
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Project Achievements
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Project Achievenments
Categories of VM
Instruction Emulation
MIPS Process Virtual Machine
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Project Achievenments
Categories of VM
Instruction Emulation
MIPS Process Virtual Machine
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Project Achievenments
Categories of VM
Instruction Emulation
MIPS Process Virtual Machine
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Project Achievenments
Categories of VM
Instruction Emulation
MIPS Process Virtual Machine
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Categories of VM
System Virtual Machine (SVM)
First developments: 1960s 1970sComplete system enrionmentsRun apps simultaneously on multiple platformsTypical Products: VirtualBox, VMWare
Process Virtual Machine (PVM)
Simpler modelRule out platform differencesRun apps written in different ISAsTypical Products: JVM, SPIM
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Figure 1: A taxonomy of Virtual Machines
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Instruction Emulation
Interpretation
Easy to implementEfficiency bottleneck
Binary Translation
Speed up, esp. for hotspot codesSlow startup
Hybrid Approach
Combine the previous twoSelect proper strategies at run-time
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Figure 2: Basic steps of instruction emulation
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
MIPS Process Virtual Machine
Programme Loader
Predecoding Interpretation
Table-Driven Execution
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Figure 3: Process Layout
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
MIPS Instruction Format
I-Type(Immediate)
J-Type(Jump)
R-Type(Register)
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Figure 4: MIPS Instruction Format
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Table-Driven Execution
Switch-loop is suboptimal!
Figure 5: Switch Loop Approach
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Table-Driven Execution(Cont.)
Table-Driven Approach is Better!
(a) Execution Function Table (b) Instruction Execution
Figure 6: Table-Driven Execution
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Conclusion
VM is a promising field
VM is worth studying
VM would have an even wider application
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project
Project BackgroundProject Scope
Project Achievements
Thank you!
Yan Dacong, Zhang Xuchao, Duan Beichen Virtual Machine Project