Docs

Topic 3 · Hardware

Primary storage, secondary storage, and the cloud

RAM and ROM, magnetic, optical, and solid-state storage, virtual memory, and cloud storage.

Lesson 3 of 4Syllabus 3.3updated October 31, 2026

Primary storage

Primary storage is directly accessed by the CPU. It holds the data and instructions currently in use.

RAMROM
Full nameRandom access memoryRead only memory
Volatile?Yes: contents lost when power is offNo: contents kept without power
Can be changed?Read and writeRead only
HoldsPrograms and data currently in use, including parts of the OSThe start-up instructions (bootstrap / BIOS)

Key idea. Volatile means the data disappears when the power is switched off.

Secondary storage

Secondary storage is non-volatile and keeps files permanently. It is not directly accessed by the CPU: data has to be loaded into RAM first. There are three technologies:

TypeHow it worksExamplesStrengthsWeaknesses
MagneticPlatters spin; a read/write head magnetises tiny areas to store 1s and 0sHard disk drive (HDD)Large capacity, low cost per GBMoving parts, slower, can be damaged if dropped
OpticalA laser reads pits and lands burned onto the disc surfaceCD, DVD, Blu-rayCheap, portableSmall capacity, slow, easily scratched
Solid-stateTransistors (NAND flash) trap electrons to store data; no moving partsSSD, USB stick, SD cardVery fast, robust, silent, low powerHigher cost per GB, limited number of writes

Virtual memory

When RAM is full, the operating system can use part of secondary storage as virtual memory. Data that is not needed right now is moved out of RAM to make room, and swapped back in when it is needed.

This stops the computer crashing when RAM runs out, but secondary storage is much slower than RAM, so if a lot of swapping happens the computer slows down badly (disk thrashing).

  1. 1
    RAM is full
    A program needs more memory.
  2. 2
    Move out
    Data not in use is moved from RAM to virtual memory on the disk.
  3. 3
    Load in
    The needed data takes its place in RAM.
  4. 4
    Swap back
    When the moved data is needed again, it is swapped back into RAM.

Cloud storage

Cloud storage keeps your files on remote servers owned by a provider and accessed over the internet. The data is actually stored on many physical servers, often copied in several places.

  • Benefits: access files from any device with internet; easy to share; the provider handles backups and security; pay for only the space you need.
  • Drawbacks: no internet means no access; you rely on the provider's security; ongoing subscription costs; uploads and downloads use bandwidth.

Key terms

Primary storage
Storage directly accessed by the CPU: RAM and ROM.
Secondary storage
Non-volatile storage for keeping files permanently.
Volatile
Loses its contents when the power is turned off.
Virtual memory
Secondary storage used as an extension of RAM when RAM is full.
Cloud storage
Storing data on remote servers accessed over the internet.

Check yourself

Why is the start-up program stored in ROM instead of RAM?Show answer

ROM is non-volatile, so the instructions are still there when the computer is switched on, and they cannot be accidentally changed.

Give two reasons a laptop might use an SSD instead of an HDD.Show answer

SSDs have no moving parts so they are more robust if dropped; they are faster, lighter, quieter, and use less power.

Why can heavy use of virtual memory make a computer slow?Show answer

Secondary storage is much slower than RAM, so swapping data back and forth takes time.