Memory and storage
Computers use a hierarchy of memory technologies, each with different cost, speed and persistence trade-offs. AQA expects you to distinguish RAM from ROM, volatile from non-volatile, and the major secondary-storage technologies.
Primary memory
RAM (Random Access Memory)
- Volatile — contents lost when power is removed.
- Read/write — programs and data can be loaded and modified.
- Fast but more expensive per byte than secondary storage.
- Holds the running OS, currently-open apps and their data.
- Typical size: 8-32 GB on modern PCs.
ROM (Read Only Memory)
- Non-volatile — contents survive power loss.
- Pre-programmed at manufacture; usually cannot be changed (read-only) or only with special procedures.
- Used for firmware and BIOS — the boot-up code that starts the computer and loads the OS into RAM.
- Typical size: a few MB.
Volatile vs non-volatile (key term)
- Volatile — needs power to retain data. RAM, cache, registers.
- Non-volatile — retains data without power. ROM, hard drives, SSDs, flash memory.
Cache
A small, very fast volatile memory between the CPU and RAM (covered in CS4.7). L1/L2/L3 caches reduce average memory access time.
Virtual memory
When RAM fills up, the OS uses a portion of secondary storage (the page file or swap file) as if it were extra RAM. Pages of memory not currently being used are swapped out to disk; brought back when needed.
- Allows more processes to run than physical RAM allows.
- Slow because disk is much slower than RAM — system feels sluggish ("thrashing" if too much swapping).
- Adding more RAM is a common upgrade to reduce reliance on virtual memory.
Secondary storage
Larger, cheaper, non-volatile storage. Three main technologies:
Magnetic (HDD — Hard Disk Drive)
- Spinning platters coated in magnetic material; read/write heads on a moving arm.
- Capacity: cheap, very large (1-20 TB).
- Speed: moderate (~100 MB/s read).
- Reliability: mechanical parts can fail.
- Use: bulk storage, backups, archives.
Solid-state (SSD)
- No moving parts; stores data in NAND flash chips.
- Capacity: 256 GB-8 TB on consumer PCs.
- Speed: fast (~500 MB/s SATA, 3-7 GB/s NVMe).
- Reliability: limited write cycles, but no mechanical failure.
- Power: low, silent, light.
- Use: OS drive, laptops, gaming, anywhere speed matters.
Optical (CD, DVD, Blu-ray)
- Pits and lands on a reflective disc, read by a laser.
- Capacity: 700 MB (CD) to 100 GB+ (Blu-ray).
- Speed: slow.
- Use: distribution media (films, software installs), archive (rare today).
Memory hierarchy
From fastest+smallest+most expensive to slowest+largest+cheapest:
Registers (~1 ns; <1 KB)
L1 cache (~1 ns; ~64 KB)
L2 cache (~3 ns; ~256 KB)
L3 cache (~10 ns; ~10 MB)
RAM (~80 ns; 8-32 GB)
SSD (~50 µs; 256 GB-2 TB)
HDD (~5 ms; 1-20 TB)
Optical / Tape (~100 ms+; arbitrary)
The cost per byte drops by orders of magnitude as you move down the hierarchy.
Choosing storage
- Speed-critical (OS, games): SSD.
- Massive bulk data (backups, video archives): HDD.
- Distribution / archival: optical.
- Tiny embedded: flash memory chips on-board.
✦Worked example
A laptop has 8 GB RAM and a 1 TB HDD. The user complains it's slow when running multiple browsers. Recommend two upgrades.
- More RAM — reduces reliance on slow virtual memory swapping B1.
- SSD — replaces or supplements HDD for the OS and apps; far faster boot and load B1.
⚠Common mistakes— Pitfalls
- Calling ROM "permanent storage" generically. ROM is small firmware storage; secondary storage (HDD/SSD) is "permanent" data storage.
- Confusing RAM and ROM. RAM is volatile read/write; ROM is non-volatile read-only.
- Treating cache as RAM. Cache is much smaller, faster and on-CPU.
- Saying virtual memory is faster than RAM. It uses slow disk — it's slower, but extends capacity.
- Calling an SSD "a fast HDD". Different technology — flash chips, no spinning parts.
➜Try this— Quick check
State whether each is volatile or non-volatile:
- RAM — volatile.
- ROM — non-volatile.
- HDD — non-volatile.
- SSD — non-volatile.
- Cache — volatile.
- USB flash drive — non-volatile.
AI-generated · claude-opus-4-7 · v3-deep-computer-science