Virtualization
Virtualization
• Emulation
– VM emulates/simulates complete hardware
– Unmodified guest OS for a different PC can be run
• Bochs, VirtualPC for Mac, QEMU
• Full/native Virtualization
– VM simulates “enough” hardware to allow an unmodified
guest OS to be run in isolation
• Same hardware CPU
– IBM VM family, VMWare Workstation, Parallels,…
Types of virtualization
• Para-virtualization
– VM does not simulate hardware
– Use special API that a modified guest OS must use
– Hypercalls trapped by the Hypervisor and serviced
– Xen, VMWare ESX Server
• OS-level virtualization
– OS allows multiple secure virtual servers to be run
– Guest OS is the same as the host OS, but appears isolated
• apps see an isolated OS
– Solaris Containers, BSD Jails, Linux Vserver
• Application level virtualization
– Application is gives its own copy of components that are not shared
• (E.g., own registry files, global objects) - VE prevents conflicts
– JVM
1
Type 1 hypervisor
Type 2 Hypervisor
• VMWare example
– Upon loading program: scans code for basic blocks
– If sensitive instructions, replace by Vmware procedure
• Binary translation
– Cache modified basic block in VMWare cache
• Execute; load next basic block etc.
• Type 2 hypervisors work without VT support
– Sensitive instructions replaced by procedures that emulate
them.
2
Paravirtualization
3
Memory virtualization
I/O Virtualization
4
Server Design Issues
• Server Design
– Iterative versus concurrent
• How to locate an end-point (port #)?
– Well known port #
– Directory service (port mapper in Unix)
– Super server (inetd in Unix)
Stateful or Stateless?
• Stateful server
– Maintain state of connected clients
– Sessions in web servers
• Stateless server
– No state for clients
• Soft state
– Maintain state for a limited time; discarding state does not
impact correctness
5
Scaling viaServer Clusters
6
Code and Process Migration
• Motivation
• How does migration occur?
• Resource migration
• Agent-based system
• Details of process migration
Motivation
7
Motivation
• Flexibility
– Dynamic configuration of distributed system
– Clients don’t need preinstalled software – download on demand
Migration models
8
Who executes migrated entity?
• Code migration:
– Execute in a separate process
– [Applets] Execute in target process
• Process migration
– Remote cloning
– Migrate the process
9
Do Resources Migrate?
10
Migration in Heterogeneous Systems
• Systems can be heterogeneous (different architecture, OS)
– Support only weak mobility: recompile code, no run time information
– Strong mobility: recompile code segment, transfer execution segment
[migration stack]
– Virtual machines - interpret source (scripts) or intermediate code [Java]
• Software agents
– Autonomous process capable of reacting to, and initiating
changes in its environment, possibly in collaboration
– More than a “process” – can act on its own
• Mobile agent
– Capability to move between machines
– Needs support for strong mobility
– Example: D’Agents (aka Agent TCL)
• Support for heterogeneous systems, uses interpreted
languages
11
Case study: Condor
12
Case Study: ISOS
13