VM
CMPSC 311 - Introduction to Systems Programming
Course Information
Title: CMPSC 311 - Introduction to Systems Programming
Professor: Suman Saha
Slides by: Professor Patrick McDaniel and Professor Abutalib Aghayev
Operating Systems
Definition
Operating System (OS):
Software that manages machine hardware.
Provides interface and abstractions for user applications and systems software.
Types of Hardware
Machines:
Desktops, laptops, servers, mobile devices.
Examples of Operating Systems
Common OSs:
Windows, macOS, Linux, FreeBSD, Android, iOS.
OS Dominance by Sector
Market Share:
Desktop/Laptops: Windows > macOS > Linux
Server: Likely Linux, no reliable source.
Mobile: Android > iOS
System Overview
Components:
Hardware: CPU, RAM, SSD
Software: Operating System, User Apps, System Software
Why Learn Systems Programming on Linux?
Advantages of Linux:
Free and accessible.
Ubiquitous in the tech industry.
Dominant in many tech companies.
How to Run Linux on Your Machines?
Installation Methods
Current OS: Most students run Windows or macOS.
Virtualization Tools:
VirtualBox and VMware:
Act as hypervisors (or virtual machine monitors) to create virtual machines (VMs).
Overview:
Windows as Host OS.
Linux as Guest OS in a VM.
Architecture
Diagram Overview:
Physical Machine running Windows with VirtualBox/VMware hosting a Virtual Machine for Linux apps (e.g., git, emacs).
More on Hypervisors
Types of Hypervisors
Type 1:
Runs directly on a bare physical machine.
Examples: VMware ESXi, Xen.
Type 2:
Runs on top of an operating system.
Examples:
VMware Workstation (Fusion)
QEMU
VirtualBox
Parallels Desktop for Mac
UTM
Physical Machine Overview
Diagrams:
Illustrate the differences between Type 1 and Type 2 hypervisors.
Benefits of Virtualization
Without Virtualization
Traditional Method:
Companies manage their own servers.
Applications installed directly on hardware.
Tightly coupled to hardware leading to a single point of failure.
With Virtualization
Benefits:
Virtual Machine Images enable:
OS as a portable file that includes all applications.
Backups known as snapshots of the entire OS.
Virtual Machine Image (VMI)
Advantages
Security:
Easily secured.
Portability:
Not dependent on any physical server, allowing flexibility and easier management.