Primary Memory
intermediate25 minLearning objectives
- Distinguish between RAM, ROM and cache
- Explain volatile and non-volatile storage
- Evaluate different forms of primary memory
Learn
AQA 4.6.2 — Primary memory
Retrieval: Processor Performance mentioned cache as one of the four factors affecting speed, without explaining what it actually is. This lesson explains cache properly, alongside RAM and ROM — the memory a CPU works with directly, moment to moment.
Key vocabulary
- RAM (Random Access Memory) — fast, general-purpose working memory holding currently-running programs and their data.
- ROM (Read-Only Memory) — holds fixed startup instructions that must survive being switched off.
- Cache — very small, very fast memory sitting between the CPU and RAM.
- Volatile — loses its contents the instant power is removed.
- Non-volatile — retains its contents with no power at all.
Understand — volatility is the key distinction
RAM is volatile: switch the power off, and everything held in it is gone immediately — which is exactly why unsaved work disappears in a power cut. ROM is non-volatile: it holds the fixed instructions a computer needs the instant it's switched on (before an operating system has even loaded from disk), so it must survive having no power at all between uses.
Visualise — the memory hierarchy
FASTEST, SMALLEST, MOST EXPENSIVE PER BYTE
▲
Registers (inside the CPU itself)
Cache (very close to the CPU)
RAM (main working memory)
Secondary storage (SSD/HDD - covered next lesson)
▼
SLOWEST, LARGEST, CHEAPEST PER BYTE
Each level trades size and cost for speed: registers are tiny but instant; secondary storage is huge but comparatively slow. Cache exploits locality of reference — the well-established observation that a program tends to reuse the same instructions and data repeatedly in a short span of time (a loop, for example, re-reads the same few instructions over and over). Keeping that recently-used material in a small, very fast cache means the CPU usually doesn't have to wait for slower RAM at all.
Compare — RAM vs ROM vs cache
| RAM | ROM | Cache | |
|---|---|---|---|
| Volatile? | Yes | No | Yes |
| Typical size | Gigabytes | Megabytes or less | Kilobytes–megabytes |
| Speed | Fast | Moderate | Extremely fast |
| Typical use | Running programs and their current data | Fixed startup instructions (e.g. BIOS/firmware) | Recently/soon-to-be-reused CPU data |
Apply it — classify the memory type
For each scenario, identify RAM, ROM or cache:
- The exact instructions a computer runs the instant it's switched on, before anything else has loaded.
- The document a student is currently typing in a word processor, not yet saved.
- A value the CPU calculated moments ago inside a loop, and is very likely to need again on the very next pass.
(1: ROM — fixed, must survive being off. 2: RAM — actively being worked on, volatile. 3: Cache — recently used, kept close to the CPU for near-instant reuse.)
Explain — why not just make everything as fast as cache?
Cache-speed memory is dramatically more expensive per byte to manufacture than RAM, and RAM is in turn more expensive per byte than secondary storage. Building a computer entirely out of cache-speed memory at today's RAM-sized capacities would be enormously expensive — the memory hierarchy exists specifically because no single memory type can be simultaneously fast, large and cheap; every real computer has to trade between the three.
Common mistake
Describing RAM as "storage" — RAM is volatile working memory, not storage. A file only genuinely survives being switched off once it's been saved to non-volatile secondary storage, covered properly in the next lesson; RAM alone is never enough to keep it.
Challenge
Explain, using the difference between volatile and non-volatile memory, why word processors and other applications include an "autosave" feature that periodically writes a copy of your work to disk — what specific risk is autosave designed to reduce?
Looking ahead: the next lesson (Secondary Storage) covers the non-volatile layer at the bottom of the memory hierarchy above — where data actually lives long-term, once it's no longer being directly worked on by the CPU.