The 5-Tier Memory Hierarchy Pyramid & Cache Memory Principles
Unit 2: Computer Memory Hierarchy, Storage & I/O Systems • Fundamentals of Computer
👨🏫 Professor's Mental Model: The Master Chef's Kitchen Workstation
Memory hierarchy ek busy restaurant ke 5-star chef ke kitchen jaisi hai: Chef ke haath me pakda hua chamach/knife CPU Registers hai (Instant speed, tiny). Counter par khula hua masala box Cache Memory hai (Super fast, few KB/MB). Kitchen ki main dining table RAM hai jahan active dishes banti hain (Fast, volatile). Store room me rakha deep-freezer Secondary Storage (SSD/HDD) hai (Huge capacity, permanent). Aur warehouse me rakha godown Archival Tape hai!
The 5-Tier Computer Memory Hierarchy Pyramid
Click any tier in the pyramid below to inspect access latencies, physical silicon hardware, capacity tiers, and cost trade-offs.
SRAM Cache Memory (L1, L2, L3)
Bridges the massive speed gap between the ultra-fast CPU core and slower main DRAM memory utilizing Temporal and Spatial Locality of Reference.
1. Why Does Memory Hierarchy Exist?
2. Cache Memory Mechanics & Locality of Reference
3. Cache Organization & Mapping Architectures
| Memory Tier | Silicon Tech | Typical Capacity | Access Latency | Cost / Bit | Volatile? |
|---|---|---|---|---|---|
| Level 0: CPU Registers | Flip-Flop Latches | 64 B – 1 KB | 0.2 – 0.5 ns | Highest | Yes |
| Level 1 Cache (L1) | 6T SRAM (On-Die) | 32 KB – 64 KB | 0.8 – 1.5 ns | Very High | Yes |
| Level 2 Cache (L2) | SRAM (Near Core) | 512 KB – 2 MB | 3 – 5 ns | High | Yes |
| Level 3 Cache (L3) | Shared SRAM | 16 MB – 64 MB | 10 – 15 ns | Moderate-High | Yes |
| Level 4: Main RAM | 1T-1C DRAM Array | 8 GB – 64 GB | 50 – 80 ns | Moderate | Yes |
| Level 5: Secondary SSD/HDD | NAND Flash / Magnetic | 512 GB – 8 TB | 20 µs – 10 ms | Low | No (Permanent) |
🎯 University Exam Scoring Blueprint
- Draw the triangular Memory Hierarchy Pyramid with upward speed/cost and downward capacity arrows.
- Write the definition and mathematical formula for Hit Ratio: H = Hits / (Hits + Misses).
- Explain Temporal Locality vs Spatial Locality with code examples (Loops vs Arrays).