Operating Systems Principles
How one computer juggles hundreds of programs at once without letting them trample each other.
AI tutor is turned off for this class
Use the CS111 lectures, notes, and assignments below to keep learning.
Lesson overview
How one computer juggles hundreds of programs at once without letting them trample each other.
Teacher script · 45 min
- 0–5
Hook
Your laptop runs a browser, music, and chat 'at once,' each acting like it owns the whole machine. It's an illusion: the operating system rapidly switches between them and hands each its own private slice of memory. The OS is a referee making many programs share one set of hardware peacefully.
- 5–15
Explore
Students do the activity in pairs: Two people, one pen, both must sign. Make a rule so they never grab it at once and neither waits forever.
- 15–30
Explain
Each program thinks it has a huge, private, continuous memory starting at address zero. Really, the OS and hardware secretly map those fake addresses onto scattered chunks of real RAM (and disk). This 'virtual memory' is why programs can't spy on each other and why your computer can run more than fits in RAM.
- 30–40
Connect to the summit
Read aloud the "From the summit" section below. Ask students which ideas from today they recognize in it.
- 40–45
Check
Run the formative check below. Anyone who can explain a key term in their own words has it.
Student activity
Two people, one pen, both must sign. Make a rule so they never grab it at once and neither waits forever.
Slides
Formative check
- 1.In your own words, what is "Process"? (Looking for: A running program with its own private memory and resources.)
- 2.In your own words, what is "Concurrency"? (Looking for: Multiple tasks making progress at once, which risks them interfering.)
- 3.In your own words, what is "Race condition"? (Looking for: A bug where the outcome depends on the unpredictable timing of tasks.)
Carry-away concepts
- Process
- A running program with its own private memory and resources.
- Concurrency
- Multiple tasks making progress at once, which risks them interfering.
- Race condition
- A bug where the outcome depends on the unpredictable timing of tasks.
- Virtual memory
- The illusion that each program has its own large, private memory.
From the summit · the Stanford source
You learn how an OS manages processes, memory, concurrency, and storage: the illusion that every program owns the machine.
This module is based on a Stanford course.