Courses

Operating Systems

See what really happens under your programs. Every big idea in operating systems as a simulator you can play, pause and change: processes, CPU scheduling, threads and locks, deadlock, virtual memory, disks and file systems. For anyone who can already write code.

Intermediate · 38 lessons · about 507 min · Free, runs in your browser

Start the course

Sign in to save your progress on every device. Free, no password.

  1. 1 What an operating system does

    The referee between your programs and the hardware: kernel mode, system calls and booting.

    1. 1.1 The operating system is a referee 10 min
    2. 1.2 The hardware the OS drives 12 min
    3. 1.3 User mode, kernel mode and system calls 14 min
    4. 1.4 From the power button to your login screen 10 min
  2. 2 Processes and threads

    How a program becomes a process, how fork and exec start programs, and what switching between them costs.

    1. 2.1 A program is not a process 12 min
    2. 2.2 Process states and the PCB 12 min
    3. 2.3 fork, exec and wait 15 min
    4. 2.4 Threads 12 min
    5. 2.5 Context switching 12 min
  3. 3 CPU scheduling

    Who runs next: FCFS, SJF, round robin, priorities, MLFQ and how Linux decides.

    1. 3.1 What makes a schedule good? 12 min
    2. 3.2 FCFS and shortest job first 12 min
    3. 3.3 Round robin and the time slice 14 min
    4. 3.4 Priorities and feedback queues 14 min
    5. 3.5 How Linux schedules 12 min
    6. 3.6 Project: beat the scheduler 15 min
  4. 4 Concurrency

    Race conditions, locks, semaphores and the classic problems, then processes talking to each other.

    1. 4.1 Race conditions 14 min
    2. 4.2 Locks and atomic instructions 14 min
    3. 4.3 Semaphores and condition variables 14 min
    4. 4.4 The classic problems 15 min
    5. 4.5 Processes talking 12 min
    6. 4.6 Project: fix the broken bank 15 min
  5. 5 Deadlock

    When everyone waits forever: how to spot it, avoid it and get out of it.

    1. 5.1 Deadlock and the four conditions 12 min
    2. 5.2 Avoiding deadlock: lock ordering and the Banker’s algorithm 14 min
    3. 5.3 Detecting deadlock and recovering from it 12 min
  6. 6 Memory

    From physical addresses to paging, the TLB, page faults and choosing what to evict.

    1. 6.1 Memory without abstraction 12 min
    2. 6.2 Segmentation and fragmentation 12 min
    3. 6.3 Paging and the MMU 15 min
    4. 6.4 The TLB and multi-level page tables 15 min
    5. 6.5 Demand paging and page faults 14 min
    6. 6.6 Page replacement 15 min
    7. 6.7 Thrashing 12 min
  7. 7 Storage and files

    Devices, interrupts and DMA, disk scheduling, inodes and how journaling survives a crash.

    1. 7.1 Talking to devices 12 min
    2. 7.2 Disks, SSDs and disk scheduling 14 min
    3. 7.3 Files and directories 12 min
    4. 7.4 Inside a file system 15 min
    5. 7.5 Crashes and journaling 14 min
  8. 8 Modern systems

    Virtual machines and containers, then a capstone: find out why a real server is slow.

    1. 8.1 Virtual machines and containers 15 min
    2. 8.2 Project: why is the server slow? 20 min