Transcript 4061_27
4061 Session 27 (4/23)
Today
• Virtual Machines and Emulation
Today’s Objectives
• Understand some of the challenges and
applications of virtual machines
Admin
• My office hours on Wednesday cancelled
• HW 5: Due day of final
• Quiz 5: Last day of class
• What is a virtual machine?
• What are some examples of virtual
machines?
Virtual Machines
• One machine == one OS?
– What about
• One machine, many OS
• Many machines, one OS
• Portability of code
– Why are Java and Python more portable than
C?
• Virtual machines are a new layer of
abstraction
Why not 2?
• Why not run two operating systems at the
same time on one box?
VM History
• 1972, IBM System/360
• Mainframes
– Isolation between users
– Era before user/kernel mode bit
• Little activity in 80s and early 90s
• Exciting area today
Jails
• “chroot jail”
– Change the root directory of the calling process
– Once a running process executes chroot("/home/jail"),
/home/jail becomes "/“
– Can no longer access files above the new root
directory
• Jail is enforced by the OS, not the application
• But applications may expect the presence of
“/bin/ls”, a scratch dir, devices, and shared libs
FreeBSD Jail
• Where chroot jail was weak partitioning,
FreeBSD jail is strong partitioning
– Create virtual machines.
• Popularly used in ISPs.
Virtual OS on the Desktop
• VMWare, Parallels, KVM, Xen
• Different approaches
– Hardware emulation
– Native virtualization (with hardware)
– Paravirtualization
Mame
Wine
Java
• Bytecode
• JVM: JIT compiling
• Advantages
– Portability
– Security
Grid Computing
• Enable the virtualization of distributed
computing resources to create a single
system image across heterogeneous,
geographically dispersed IT environments.