Grade 11 · Theory
Purpose and role of cache memory and caching
Hardware · about 4 min
The CPU is far faster than main memory, so small amounts of very fast cache memory sit close to the CPU holding the data it will most likely need next.
Key points- Cache stores recently/frequently used instructions and data to avoid slow RAM trips.
- Levels: L1 (smallest, fastest, per core), L2, L3 (larger, shared, slower — but still much faster than RAM).
- A cache "hit" means the data was found in cache; a "miss" forces a slower fetch from RAM.
- Caching as a principle appears everywhere: disk cache, browser cache, web caches.
- More/faster cache is one reason two CPUs at the same GHz can perform differently.
- Cache hit/miss — whether requested data is already in the cache.
- Locality — programs tend to reuse nearby data soon, which is why caching works.
EXAM TIP
explain in two sentences WHY cache improves performance — mention the speed gap between CPU and RAM.