Memory Hierarchy, Processor vs. Memory Speed, and Memory Technologies
What is Memory Hierarchy? (In Simple Words)
Every computer user dreams of infinite memory that runs at lightning speed and costs zero rupees!
In physical reality:
- If a memory is super fast, it is super expensive and small (like CPU registers and Cache).
- If a memory is huge and cheap, it is slow (like SSDs and Hard Disks).
To balance speed, size, and cost, computer designers arrange storage like a pyramid called the Memory Hierarchy.
Small, ultrafast memory sits right next to the CPU, while large, cheap memory sits further away.
1. Processor vs. Memory Speed: “The Memory Wall”
Over the last 40 years:
- CPU processor speeds improved rapidly at 50% every year.
- But RAM memory speeds only improved by 7% per year.
This huge speed gap is called the Memory Wall:
- When a fast 4GHz CPU requests data directly from slow DRAM, it must freeze and wait for over 300 clock cycles!
- The memory hierarchy solves this: by keeping 95%+ of active data in high-speed Cache Memory, the CPU keeps running at top speed without waiting!
💡 Real-Life Indian Student Analogy:
Think of studying for exams at your desk:
- CPU Registers: The pen in your right hand (instant access).
- Cache Memory: The textbook open right on your study table (accessible in seconds).
- Main Memory (RAM): The bookshelf across the room (takes a minute to walk over).
- Secondary Storage (SSD/HDD): The college central library 2 kilometers away!
2. High-Speed RAM: SRAM vs. DRAM
Primary system RAM is built using semiconductor silicon chips. It comes in two main types:
| Feature | Static RAM (SRAM) | Dynamic RAM (DRAM) |
|---|---|---|
| Internal Cell | Built using 6 transistors as a flip-flop | Built using 1 transistor and 1 capacitor |
| Refreshing Needed? | No refresh needed (holds data steadily) | Needs continuous refreshing (capacitor charge leaks in milliseconds) |
| Speed | Extremely Fast (1 to 5 ns) | Slower (50 to 80 ns) |
| Storage Density | Lower (6 transistors take more space) | Very high (1 tiny capacitor per bit) |
| Cost | Very expensive per megabyte | Much cheaper per gigabyte |
| Main Usage | CPU Cache Memory (L1, L2, L3) | Computer Main Memory (RAM sticks) |
3. Read-Only Memory (ROM) Technologies
ROM chips hold permanent boot firmware (like BIOS / UEFI) that never disappears when the power is turned OFF (Non-Volatile):
- Mask ROM: Programmed permanently at the chip factory during manufacturing. Cannot be changed.
- PROM (Programmable ROM): A blank chip that you write onto once by burning microscopic internal fuses.
- EPROM (Erasable PROM): Can be erased by shining ultraviolet (UV) light into its quartz glass window for 20 minutes, then rewritten.
- EEPROM (Electrically Erasable PROM): Can be erased and rewritten electrically byte-by-byte without removing it from the circuit.
- Flash Memory: A modern, fast block-erasable version of EEPROM used in all SSDs, pen drives, and smartphones.
💡 DAVV Exam Preparation Tips
5-Mark Question: “Differentiate between SRAM and DRAM with at least five points of comparison.”
- Compare across 5 clear factors: internal cell (6T vs 1T-1C), refresh requirement, speed, cost, and usage.
- State clearly: SRAM is used for CPU Cache; DRAM is used for computer RAM.
10-Mark Question: “Explain the Memory Hierarchy in modern computer systems. What is the processor vs memory speed mismatch (Memory Wall)? Discuss how the hierarchy solves this problem.”
- Draw the pyramid diagram clearly showing:
- Level 1: Registers
- Level 2: Cache (L1, L2, L3)
- Level 3: Main RAM
- Level 4: Secondary Storage (SSD, HDD)
- Draw upward arrow for increasing speed and cost; downward arrow for increasing storage size.
- Explain the Memory Wall speed gap and how Cache bridges the delay.