7.2SRAM vs DRAM
The idea
SRAM stores a bit in a flip-flop: fast but bulky. DRAM stores it as charge in a capacitor: dense and cheap but it leaks, so it needs periodic refresh.
Think of it like this: SRAM is a light switch (stays where you leave it). DRAM is a bucket with a slow leak that you must top up regularly.
Why it exists
It explains why caches use SRAM and main memory uses DRAM.
How it works
- SRAM: fast, no refresh, more transistors per bit, expensive → cache.
- DRAM: 1 transistor + 1 capacitor per bit, slower, refresh needed → main memory.
- Refresh steals some memory time.
Worked example: DRAM cell
Charge drops below the readable level in milliseconds unless refreshed.
Now play with it
- →Watch the DRAM bar leak and snap back to full each time refresh happens. Turn refresh OFF and watch data die.
Qualitative comparison to build intuition, not measured values.
DRAM cell (capacitor)
Charge leaks. Below 40% the bit would be unreadable.
SRAM cell (flip-flop)
Holds its value while powered.
Check yourself
Which memory needs periodic refresh?
Exam notes (the dense version)
SRAM: flip-flops, fast, expensive, no refresh → cache. DRAM: capacitor, dense, cheap, needs periodic refresh → main memory.
Previous year questions: Memory Hierarchy & Main Memory (16)
PYQs are grouped by topic, so this is the full set for Memory Hierarchy & Main Memory; try the ones that match this subtopic. Open all 16 on the topic page.