Primary storage is memory that is directly accessible by the CPU.
It holds data and instructions that are currently in use by the computer.Primary Storage = Memory inside the computer that the CPU can read
from and write to directly, without going through secondary storage.
2. Types of Primary Storage#
3. RAM — Random Access Memory#
What is RAM?#
Temporary storage that holds the operating system, running programs,
and data currently in use.
Volatile — all data is lost when power is switched off.
Contents can be read from and written to by the CPU freely.
Called "random access" because any memory location can be accessed
directly in the same amount of time.
Key Properties of RAM#
| Property | Detail |
|---|
| Volatile? | ✅ Yes — contents lost on power off |
| Read/Write? | Both — CPU can read and write freely |
| Speed | Fast |
| Capacity | Typically 4 GB – 64 GB in modern computers |
| Used for | Running programs, open files, OS |
Why does RAM size matter?#
The more RAM a computer has:The more programs it can run simultaneously.
The faster the system feels (less need to use slower virtual memory).
The more data can be processed without accessing secondary storage.
More RAM = better multitasking and performance.
Types of RAM (for context)#
| Type | Full Name | Detail |
|---|
| DRAM | Dynamic RAM | Needs to be refreshed constantly; used for main RAM; cheap |
| SRAM | Static RAM | Faster, no refreshing needed; used for cache; expensive |
CIE exams mainly expect you to know RAM vs ROM and RAM vs Cache —
DRAM/SRAM detail is background knowledge.
4. ROM — Read Only Memory#
What is ROM?#
Permanent storage that holds fixed instructions programmed at manufacture.
Non-volatile — contents are retained when power is off.
The CPU can read from ROM but cannot write to it (under normal operation).
Stores the bootstrap program / firmware that runs when the computer starts.
What is stored in ROM?#
| Content | Description |
|---|
| Bootstrap loader | The startup program that initialises hardware and loads the OS |
| BIOS / UEFI | Basic Input/Output System — checks hardware is working on startup |
| Firmware | Fixed software controlling embedded devices |
POST (Power-On Self Test): A check run automatically from ROM every time
the computer starts, verifying that hardware components are functioning correctly.
Key Properties of ROM#
| Property | Detail |
|---|
| Volatile? | ❌ No — contents retained without power |
| Read/Write? | Read only (by CPU) |
| Speed | Slower than RAM |
| Capacity | Very small (megabytes) |
| Used for | BIOS, firmware, bootstrap program |
5. RAM vs ROM — Direct Comparison#
| Feature | RAM | ROM |
|---|
| Volatile? | ✅ Yes | ❌ No |
| Contents lost on power off? | ✅ Yes | ❌ No |
| Read/Write? | Read and Write | Read only |
| What it stores | OS, programs, open files | BIOS, firmware, bootstrap |
| Size (typical) | Gigabytes (GBs) | Megabytes (MBs) |
| Speed | Fast | Slower |
| Changed by user? | ✅ Yes | ❌ No |
6. Cache Memory#
What is Cache?#
A very small, very fast type of memory located on or close to the CPU.
Acts as a buffer between the fast CPU and the slower RAM.
Stores frequently used instructions and data so the CPU can access them
almost instantly without waiting for RAM.
Made from SRAM (faster and more expensive than DRAM used in RAM).
Cache Levels#
| Level | Location | Size | Speed |
|---|
| L1 | Inside CPU core | Smallest (KB) | Fastest |
| L2 | Inside CPU (shared) | Medium (MB) | Fast |
| L3 | Outside CPU cores (on chip) | Largest (MB) | Slightly slower |
The CPU checks L1 → L2 → L3 → RAM in order when looking for data.
How Cache Works#
Cache Hit — the requested data is found in cache → fast retrieval.
Cache Miss — data not in cache → must fetch from RAM → slower.
Why is Cache Important?#
The CPU operates much faster than RAM.
Without cache, the CPU would spend most of its time waiting for data from RAM.
Cache dramatically reduces this bottleneck.
7. Virtual Memory#
What is Virtual Memory?#
When RAM is full, the OS uses a portion of secondary storage (hard drive/SSD)
as an extension of RAM.
This area of secondary storage is called the page file or swap space.
The OS moves unused pages of RAM out to the page file to free up space for
currently needed programs.
Virtual Memory — Pros and Cons#
| ✅ Advantages | ❌ Disadvantages |
|---|
| Allows more programs to run than RAM alone permits | Much slower than real RAM |
| Prevents system from crashing when RAM is full | Heavy use causes thrashing (slow performance) |
| Cost-effective — uses existing storage | Secondary storage is slower than RAM |
Thrashing: When the system spends more time swapping data between RAM and
the page file than actually processing — causes very slow, sluggish performance.
8. How Primary Storage Types Work Together#
9. Summary Table — All Primary Storage Types#
| Type | Volatile? | Read/Write | Speed | Size | Purpose |
|---|
| RAM | ✅ Yes | Both | Fast | GBs | Holds running programs and data |
| ROM | ❌ No | Read only | Moderate | MBs | Stores BIOS / firmware |
| Cache | ✅ Yes | Both | Very fast | KBs–MBs | Speeds up CPU data access |
| Virtual Memory | ✅ Yes | Both | Very slow | GBs | Extends RAM using secondary storage |
10. Key Vocabulary#
| Term | Definition |
|---|
| Primary Storage | Memory directly accessible by the CPU |
| RAM | Volatile read/write memory holding current programs and data |
| ROM | Non-volatile read-only memory storing firmware/BIOS |
| Volatile | Memory that loses its contents when power is removed |
| Non-volatile | Memory that retains contents without power |
| Cache | Very fast small memory storing frequently accessed data near the CPU |
| Cache Hit | When the CPU finds needed data in cache |
| Cache Miss | When data is not in cache and must be fetched from RAM |
| Virtual Memory | Using secondary storage as an extension of RAM when RAM is full |
| Page File | The area of secondary storage used by virtual memory |
| Thrashing | Severe slowdown caused by excessive virtual memory usage |
| BIOS | Basic Input/Output System — firmware stored in ROM |
| POST | Power-On Self Test — hardware check run from ROM at startup |
| Bootstrap | Program in ROM that loads the operating system on startup |
11. Exam Tips ✅#
Volatile vs non-volatile — the single most tested concept:
RAM = volatile, ROM = non-volatile. Never mix these up.
A common exam question: "Why is ROM used to store the BIOS?"
→ Because ROM is non-volatile, so the startup program is not lost
when the computer is switched off.
Cache questions often ask why it improves performance —
answer: it is faster than RAM and stores frequently used data
closer to the CPU, reducing wait time.
Virtual memory questions often ask about disadvantages —
always mention that it is much slower than RAM because
secondary storage access is slow.
Know the order of access speed: Cache > RAM > Virtual Memory.
A common trap: virtual memory is not the same as RAM —
it uses secondary storage and is significantly slower.
Cambridge (CIE) IGCSE Computer Science — 0478 / 0984 Modified at 2026-04-03 09:57:21