Phase 1.03
Memory Hierarchy & RAM
Balanced storage design: SRAM vs DRAM and hierarchical standards.
Memory Hierarchy
No single memory is perfect. We use a hierarchy to balance Speed, Cost, and Capacity:
- Registers: Fastest, smallest, inside CPU.
- Cache: Fast SRAM, between CPU and RAM.
- Primary Memory (RAM): Main workspace, volatile.
- Secondary Memory: Large, non-volatile (HDD/SSD).
RAM (Random Access Memory)
RAM is volatile—data is lost when power is cut. It has two main types:
- DRAM (Dynamic RAM):
- Uses capacitors (charge leaks, needs constant refresh).
- Slower but much cheaper and denser.
- Used for main system memory.
- SRAM (Static RAM):
- Uses flip-flops (retains state without refresh as long as power is on).
- Extremely fast but expensive/bulky.
- Used for CPU Cache.
ROM (Read Only Memory)
Non-volatile; used for critical firmware.
- PROM: Programmable once.
- EPROM: Erasable by UV light and reprogrammable.
- EEPROM: Erasable electrically. Basis of Flash memory.
Technical Terms Breakdown
Primary Memory
Directly accessible by the CPU. Includes RAM, Cache, and ROM.
Secondary Memory
Used for long-term storage of files and OS. Non-volatile.
Volatility
The characteristic of memory where data is erased when power is lost.
Data Access Methods
Sequential (Tape) vs Direct (Disk/RAM) access.