AlgoViz
⚙️ How the computer runs everything

Operating Systems

Your computer runs dozens of programs at once on one CPU that can only do one thing at a time. The operating system is the invisible manager pulling it off — taking turns so fast it looks simultaneous, sharing memory without programs trampling each other, and keeping it all from grinding to a halt. We build that whole picture from zero.

  1. 1

    What is an operating system?

    Easy

    The invisible manager between your apps and the hardware. What it actually does, and why you need it.

  2. 2

    Process vs. program

    Easy▶ has animation

    A program is the recipe sitting on disk; a process is the cooking actually happening. The difference matters.

  3. 3

    What is a thread?

    Medium

    Many cooks in one kitchen. A thread lets one process do several things at once, sharing the same memory.

  4. 4

    Context switching

    Medium▶ has animation

    How the CPU swaps from one process to another: save everything the first was doing, load back the second — so each resumes exactly where it left off.

  5. 5

    Concurrency vs. parallelism

    Medium

    They sound identical but aren't. Concurrency = one worker taking turns fast. Parallelism = many workers truly working at the same time.

  6. 6

    Race conditions

    Medium▶ has animation

    Two threads change the same thing at the same time — and the answer comes out wrong. A whole update can just vanish.

  7. 7

    Locks & mutexes

    Medium

    The fix for race conditions: a lock lets only ONE thread touch the shared thing at a time. Everyone else waits their turn.

  8. 8

    Memory & addresses

    Easy

    RAM is a giant wall of numbered boxes. Each box holds a tiny value, and its number is its 'address'.

  9. 9

    Virtual memory

    Medium

    Every program is fooled into thinking it owns one big, private stretch of memory — the OS keeps a secret map to where it really sits.

  10. 10

    Paging

    Medium▶ has animation

    How the memory map is really built: chop memory into fixed-size chunks and keep a lookup list of which chunk lives where.

  11. 11

    The file system

    Easy

    Your disk is really a huge pile of numbered blocks. The file system is the OS layer that turns it into friendly files-and-folders.

  12. 12

    Capstone: the life of a keystroke

    Hard

    Press one key and watch the whole OS spring into action — interrupts, context switches, process states, and scheduling, all in a blink.