💾 Memory and Storage

Understand how computers store data - from lightning-fast RAM to permanent storage.

What you'll learn:

  • Why computers need primary storage (memory)
  • The difference between RAM and ROM
  • The purpose of RAM and ROM in a computer system
  • What virtual memory is and why it's needed
  • How cache memory speeds up your computer
  • How data transfers between RAM and secondary storage

Specification Reference: 1.2.1 Primary Storage (Memory)

This topic covers the GCSE Computer Science specification requirements for understanding computer memory systems.

Key Concepts Overview

🧠

Primary Storage

Memory that the CPU can access directly. Includes RAM and ROM. Fast but limited in size.

Why needed: The CPU needs somewhere to store data and instructions it's currently working with. Secondary storage (like hard drives) is too slow for this.
⚡

RAM (Random Access Memory)

Volatile memory that stores data and programs currently in use.

  • Volatile: Loses contents when power is off
  • Read/Write: Can be changed
  • Fast: Quick access times
  • Stores: Running programs, open files, OS
🔒

ROM (Read Only Memory)

Non-volatile memory that stores permanent instructions.

  • Non-volatile: Keeps contents when power is off
  • Read Only: Cannot be changed (easily)
  • Permanent: Set during manufacturing
  • Stores: BIOS/boot instructions
🔄

Virtual Memory

Uses secondary storage as an extension of RAM when RAM is full.

How it works:
  1. RAM becomes full
  2. Least-used data moved to hard drive (page file)
  3. When needed again, swapped back to RAM
  4. Called "paging" or "swapping"

Slower than RAM - causes "disk thrashing" if overused!

🚀

Cache Memory

Small, ultra-fast memory between CPU and RAM.

  • Purpose: Stores frequently used data
  • Speed: Faster than RAM
  • Size: Very small (MB not GB)
  • Levels: L1 (fastest), L2, L3

Memory Hierarchy

Computer memory is organised in a hierarchy - faster memory is smaller and more expensive:

CPU Registers Fastest | Smallest | Built into CPU
Cache (L1, L2, L3) Very Fast | Small (MB) | Stores frequent data
RAM Fast | Medium (GB) | Current programs
Virtual Memory Slow | Large | Overflow from RAM
Secondary Storage (SSD/HDD) Slowest | Largest | Permanent storage

RAM vs ROM Comparison

Feature RAM ROM
Volatility Volatile (loses data when power off) Non-volatile (keeps data)
Read/Write Can read and write Read only (cannot change easily)
Speed Fast Slower than RAM
Size Larger (4-64+ GB typical) Smaller (few MB)
Purpose Store running programs & data Store boot instructions (BIOS)
Contents Changes constantly Permanent/rarely changes

Learning Path

Follow these activities in order to master memory concepts.

Key Vocabulary

Primary Storage

Memory directly accessible by the CPU (RAM and ROM).

Secondary Storage

Permanent storage like hard drives and SSDs.

Volatile

Memory that loses its contents when power is switched off.

Non-volatile

Memory that retains its contents without power.

BIOS

Basic Input/Output System - stored in ROM, runs when computer starts.

Page File

Area on hard drive used for virtual memory.

Disk Thrashing

Excessive swapping between RAM and virtual memory, slowing the system.

Cache Hit/Miss

When requested data is (hit) or isn't (miss) found in cache.

Exam Tips

Common Exam Questions

  • "Explain why a computer needs both RAM and ROM" (4 marks)
  • "Describe how virtual memory works" (3 marks)
  • "Explain the purpose of cache memory" (2 marks)
  • "Compare RAM and ROM" (4 marks)

Key Points to Remember

  • RAM = temporary, changeable, volatile
  • ROM = permanent, fixed, non-volatile, stores BIOS
  • Virtual memory = overflow for RAM, uses hard drive
  • Cache = speeds up CPU access to frequently used data
  • More RAM = less need for virtual memory = faster computer