Index

Module 03 · How Computers WorkMany programs, one machine

Processes, Threads & the Kernel

Processes Threads and the Kernel
Processes Threads and the Kernel · Open board

The one program standing between every other program and the real machine, handing out turns on the chip and private-looking slices of memory so a handful of real cores can serve hundreds of programs at once.

Before you start. The last lesson, How Code Becomes Execution (compilers, stack & heap), left one program’s instructions running as a single stream on the CPU, fetched and carried out one at a time, as if that program owned the chip outright. This lesson is about the hundreds of programs actually doing that on the same handful of cores at once, and the one piece of software that keeps them from reading or overwriting each other.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

The program needs twelve pages at once. What happens when it gets eleven frames?

Drag Frames of real memory from 24 down to 11, then back to 12, and watch Time spent working.

Open The working set →

Three long jobs are running when you press a key. How long until the keypress gets the CPU?

Click Take turns, drag How long one turn lasts from 100 ms down to 1 ms, and watch The keypress waits.

Open The time slice →

Related paper

Review How Computers Work →

Saved in this browser, and to your account when you sign in.