# 5.1 The Warming Rack (Shared Buffers)

In Chapter 1, we saw how every suitcase (row) is packed into an 8KB **[[Chapter 1/1.2 - The Page|Page]]**. But the elephant is far too lazy to carry these pages up from the storage basement every time someone asks a question.
Instead, he keeps a **Warming Rack** right in the middle of the room. This rack is called the **Shared Buffers**.
## The Microwave Mentality
The Warming Rack is the most expensive piece of furniture in the warehouse. It is where the most popular pages live, kept warm and ready for instant access.
When a soldier needs a page, he first checks the rack. If it's there (a **Buffer Hit**), he can read it in the time it takes to blink (Elephant Time: 5 minutes). If it's not (a **Buffer Miss**), he has to put on his coat and spend 4 months walking to the basement to fetch it.
## The Clock Sweep (Who Stays Warm?)
Because the rack is small and the warehouse is infinite, the elephant must eventually decide which pages to kick off the rack to make room for new ones. He uses a clever game called the **Clock Sweep Algorithm**.
1. Every page on the rack has a **Usage Count** (a tiny number from 0 to 5).
2. The elephant walks around the rack like a clock hand.
3. Every time he passes a page, he decrements its count by 1.
4. If he finds a page with a count of **0**, he kicks it off and puts a new page there.
5. But if a soldier accesses a page, its count is instantly bumped back up!
This ensures that "Hot" pages (the ones everyone is looking at) stay warm and cozy, while legacy data slowly cools down and returns to the basement.
---
[[Chapter 5/5.0 - The Hunger of Resources|← 5.0 - The Hunger of Resources]] | [[Chapter 5/5.0 - The Hunger of Resources|↑ 5.0 - The Hunger of Resources]] | [[Chapter 5/5.2 - The Private Desk|5.2 - The Private Desk →]]