The room every page passes through, with a pin count and a usage dial on each desk. This lesson builds that room in about two hundred lines of Go and breaks it on purpose.
Before you start.The Buffer Pool explained the room: frames, pinned and dirty pages, the clock sweep, and the small ring a big scan gets. Pages built a pager whose cache is a map that only grows, and said so. This lesson replaces that map with a pool of fixed size. You need to read Go, nothing more. If you have never read Go, start with Reading Go in twenty minutes. The code is in teaching/code/database-internals/01-bufferpool.
Lesson 19 of 26 in Database Internals
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.