Feynman
← All modules
CS111How Computing WorksCore55 min

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.

Big Idea

How Computing Works

Grade bands

K-2 · 3-5 · 6-8 · 9-12

AI literacy pillar

How AI works · Ethics

View on the ladder →

Lesson overview

How one computer juggles hundreds of programs at once without letting them trample each other. This module climbs from an everyday intuition to the real mechanism, then names the Stanford course it descends from.

Teacher script · ~45 min

  1. 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.

  2. 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. You just designed a lock.

  3. 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.

  4. 30–40

    Connect to the summit

    Show students this is the real thing professionals build: CS111, the real thing. How one computer juggles hundreds of programs at once without letting them trample each other.

  5. 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. You just designed a lock.

Slides

1Title: Operating Systems Principles
2Hook: The great illusionist
3Do it: Taking turns and not colliding
4How it works: Virtual memory: everyone gets the penthouse
5Key idea: Process
6Key idea: Concurrency
7Key idea: Race condition
8From the summit: CS111 at Stanford

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 descends from CS111 at Stanford. Students who climb the full ladder arrive here.