CMPSC 311 - Lecture 1 Notes
CMPSC 311 - Introduction
- CMPSC 311 - Introduction to Systems Programming
- Slides are mostly by Professor Patrick McDaniel and Professor Abutalib Aghayev
Operating Systems
- Operating Systems - 10,000-foot view.
- What is an operating system (OS)?
- Software that manages machine hardware and provides interface and abstractions atop which user applications and systems software are built.
- Types of machines/hardware:
- Desktops, laptops, servers, mobile devices
- Examples of OSs:
- Windows, macOS, Linux, FreeBSD, Android, iOS
- OS dominance by sector:
- Desktop/laptops: Windows > macOS > Linux
- Server: no reliable source, probably Linux
- Mobile: Android > iOS
- Diagram illustrates the relationship between hardware, operating system, user applications, and system software.
Why Learn Systems Programming on Linux?
- It is free and ubiquitous.
- Many tech companies run on Linux.
Running Linux on Machines
- Most users likely run Windows or macOS.
- VirtualBox/VMware are used to run Linux on these machines.
- VMware/VirtualBox is a hypervisor (or virtual machine monitor).
- Software that creates virtual machines (VMs).
- Diagram illustrates how VirtualBox/VMware enables running virtual machines with different operating systems (Linux, Windows) on a physical machine.
Hypervisors
- Two types of hypervisors:
- Type 1: runs on bare physical machine
- Type 2: runs on an operating system
- Examples of type 2 hypervisors:
- VMware Workstation (Fusion)
- QEMU
- VirtualBox
- Parallels Desktop for Mac
- UTM
- Examples of type 1 hypervisors:
- Diagrams illustrate the architecture of Type 1 and Type 2 hypervisors, showing where they sit in relation to the physical machine and operating system.
Benefits of Virtualization
- Without Virtualization:
- Companies manage their own servers.
- Applications are installed directly on the OS.
- OS is tightly coupled to the hardware.
- Single point of failure.
- With Virtualization:
- Virtual Machine Image is provided.
- OS exists as a portable file.
- Includes OS and all applications on it.
- Backups of the entire OS can be created (snapshot).
Virtual Machine Image (VMI)
- Easily secured.
- Portable.
- Not dependent on physical server.