ch18
Chapter Overview
Chapter Title: Chapter 18: Virtual Machines
Textbook Reference: Operating System Concepts – 10th Edition by Silberschatz, Galvin, and Gagne (2018)
Chapter Objectives
Explore the history and benefits of virtual machines.
Discuss various virtual machine technologies.
Describe methods for virtualization implementation.
Highlight common hardware features facilitating virtualization.
Review current areas of virtualization research.
Overview of Virtual Machines
Fundamental Idea: Abstracts hardware of a computer into multiple execution environments.
Components:
Host: Underlying hardware system.
Virtual Machine Manager (VMM)/Hypervisor: Creates/runs virtual machines, provides identical interface to host.
Guest: Process with a virtual copy, often an operating system.
Enables multiple operating systems to run concurrently on a single physical machine.
Virtual Machine Implementation Types
Type 0 Hypervisors: Hardware-based solutions (e.g., IBM LPARs).
Type 1 Hypervisors: Operating-system-like software for virtualization (e.g., VMware ESX).
Type 2 Hypervisors: Applications running on host OS, offering VMM features (e.g., VMware Workstation).
Paravirtualization: Modified guest OS working with VMM.
Programming-Environment Virtualization: Not true virtualization; enhances language execution (e.g., Java).
Emulation: Guest runs on different CPU architecture.
Application Containment: Virtualization-like features without full VMs (e.g., Solaris Zones).
Benefits and Features of Virtual Machines
VMs protect host and each other from viruses.
Features include snapshots, cloning, and live migration.
Allows running multiple OS types on a single machine, ideal for OS research and application development.
History of Virtual Machines
Originated in IBM mainframes in 1972.
Formal definition led to expansion beyond IBM.
Technology for virtual machines developed in late 1990s, still in use today (e.g., Xen, VMware).
Building Blocks of Virtual Machines
Challenges: Duplication of underlying machines; increasingly easier with CPU features.
Virtual CPUs (VCPUs): Represent state of the CPU for each guest.
Dual Mode Operation: VM requires separate user and kernel mode to operate securely.
CPU Scheduling
VMM uses scheduling algorithms to allocate CPU resources among guests.
CPU overcommitment leads to performance concerns like incorrect time-of-day clocks.
Memory Management
Strategies to handle memory efficiency due to oversubscription.
Techniques include double-paging, balloon memory management, and deduplication.
I/O Management
Integration challenges due to complex nature of I/O in VMMs.
Provides new devices and drivers for guests, direct device access, and NAT for networking.
Live Migration
Allows running guests to move between systems without access interruption, enhancing resource management.
Examples of Virtualization Technologies
VMware Workstation: A Type 2 hypervisor that allows multiple OSes.
Java Virtual Machine: Offers a versatile programming environment.
Virtualization Research Areas
Focus on efficiency and security, leveraging unikernels and specialized machine images.
Emerging projects targeting real-time execution, task separation, and more secure VM architectures.