Introduction
Imagine your computer needs to find the address of data in memory quickly, but the address it uses is virtual, not physical. Without a fast way to translate these addresses, your computer would slow down a lot.
Imagine a librarian who needs to find books quickly. Instead of searching the entire library every time, the librarian keeps a small list of recently used books on their desk. When a book is requested, the librarian first checks this list before searching the whole library.
┌─────────────────────────────┐
│ CPU Requests │
└─────────────┬───────────────┘
│
▼
┌─────────────────────────────┐
│ TLB Cache │
│ ┌───────────────┐ │
│ │ Translation │ │
│ │ Entries │ │
│ └───────────────┘ │
└───────┬────────────┬────────┘
│ │
TLB Hit TLB Miss
│ │
▼ ▼
┌─────────────┐ ┌───────────────┐
│ Use Cached │ │ Look up Page │
│ Physical │ │ Table in │
│ Address │ │ Memory │
└─────────────┘ └───────────────┘