Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 13 · From Scratch · Container Runtime · with code: Go · about 11 min to read

Play it as a journeyTutor comes with a plan

Container 05: Cgroups, Memory and Process Limits

The Sandbox Architecture
The Sandbox Architecture · Open board

The walls Kubernetes puts around untrusted code. The ceiling on memory and on process count is one of them, and this stage builds it.

Before you start. Container 04: /proc and /dev finished the walls that change what a box can see. This stage adds the one that changes how much it can use. You need to know that a program’s memory is the RAM the kernel has handed it, and that a process is a running program (Processes, Threads & the Kernel). A fork bomb is a program that makes copies of itself without end, each copy making more, until the machine has no room for anything else. You do not need to have seen one.

Lesson 99 of 117 in From Scratch

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 18 October 2026: 60 megabytes in a 32 megabyte room
  • A cgroup is a folder
  • The three files that do the work
  • A fork bomb, stopped
  • When the limit is set: before the program exists

Terms it explains: process, fork bomb, OOM, Control groups, cgroups v2, `memory.max`, `memory.swap.max`, `pids.max`, controller, `limits`, `newCgroup`, `report`, `remove`, `run.go`, The tests, Changes to try.

Review From Scratch