Virtualization Io
Virtualization Io
Virtualization is HOT
Microsoft acquires Connectix Corp. EMC acquires VMware Veritas acquires Ejascent IBM, already a pioneer Sun working hard on it HP picking up Virtualization is HOT!!!
A framework that combines or divides [computing] resources to present a transparent view of one or more environments
Hardware/software partitioning (or aggregation) Partial or complete machine simulation Emulation (again, can be partial or complete) Time-sharing (in fact, sharing in general) In general, can be M-to-N mapping (M real resources, N virtual resources) Examples: VM (M-N), Grid Computing (M-1) , Multitasking (1-N)
Virtualization: Why?
Server consolidation Application Consolidation Sandboxing Multiple execution environments Virtual hardware Debugging Software migration (Mobility) Appliance (software) Testing/Quality Assurance
A virtualizable architecture allows any instruction inspecting/modifying machine state to be trapped when executed in any but the most privileged mode - Popek & Goldberg (1974)
Instructions
HARDWARE
Interprets, translates to host ISA (if required) Device abstractions implemented in software Inefficient
Optimizations: Caching? Code reorganization? Applications: Debugging, Teaching, multiple OS Ring Compression Between real machine and emulator (maps to real hardware) Handling non-virtualizable architectures (scan, insert code?) Applications: Fast and usable, virtual hardware (in above too), consolidation, migration
contd
Virtualized SysCall Interface (may be same) May or may not provide all the device abstractions Easy to manipulate (create, configure, destroy) Presents a different subsystem API to application Complex implementation, if kernel API is limited User-level device drivers
Virtual architecture (ISA, registers, memory, ) Platform-independence ( highly portable) Less control on the system (extremely high-level)
Overall Picture
ISA Performance * Flexibility **** HAL **** *** * OS **** ** *** Library *** ** ** ** ** ** PL
Ease of Impl **
Degree of Isolation
***
****
**
**
***
Technologies
Issues
Emulation: Translates guest ISA to native ISA Emulates h/w specific IN/OUT instructions to mimic a device Translation Cache: Optimizes emulation by making use of similar recent instructions Code rearrangement Speculative scheduling (alias hardware) Efficient Exception handling Self-modifying code
Crusoe (Transmeta)
x86 processor and most of the hardware (VGA, disk, keyboard, mouse, ) Custom BIOS, emulation of power-up, reboot Host ISAs: x86, PowerPC, Alpha, Sun, and MIPS
QEMU:
Code morphing engine dynamic x86 emulator on VLIW processor 16 MB translation cache Shadow registers: Enables easy exception handling
Full Implementation
Multiple target ISAs: x86, ARM, PowerPC, Sparc Supports self-modifying code Full-software and simulated (using mmap()) MMU
Drivers Host and VMM worlds I/O Multilevel privilege domains Scan code and insert/replace artificial traps Cache results to optimize
Protection Rings
No
(Non-strictly)
E.g.
Non
VMware Architecture
VM Driver works as the communication link between VMM and VM Application World switch needs to save and restore machine state Additional techniques to increase efficiency
Low level I/O instructions (issued by guest OS) are merged to high-level I/O system calls VM Application executes I/O SysCalls