← GCSE Computer Science · OCR · GCSE Computer Science revision
⭐ 0
OCR GCSE Computer Science (J277) · 1.2.1–1.2.3 Memory and storage
Mini-Lesson

Memory and storage

2 missions. Guess, learn, then check. Your place is saved.

  1. Mission 1Pull the plug and unsaved work is gone. So how does it boot?
  2. Mission 2One storage firm runs 300,000+ spinning hard disks. Why not SSDs?
Mission 1

Pull the plug and unsaved work is gone. So how does it boot?

Make a guess: Pull the plug and unsaved work is gone. So how does it boot?

Hardware · primary memory

Primary storage

Memory hierarchyRegistersCacheRAMROMSecondary storagemainmemory /primarystoragebelow the line: not directly accessed by the CPUfaster,smaller,more costlyper byte
  • Primary storage (main memory) is memory the CPU can access directly.
  • It holds the instructions and data the CPU is using now. Secondary storage is too slow for the CPU to work from directly.
  • Main memory is made up of RAM and ROM.
Hardware · primary memory

RAM

  • RAM (random access memory) holds the operating system, the programs that are open and the data they are using.
  • The CPU can read and write RAM, so its contents change all the time.
  • RAM is volatile: its contents are lost when the power is switched off. That is why unsaved work disappears.
  • More RAM lets more programs and data be open at once without slowing down.
Hardware · primary memory

ROM

RAM and ROM in a power cut1 Power onRAMOS, essay.docROMstart-upinstructions2 Power offRAM(empty)ROMstart-upinstructions3 Power on againRAMOSROMstart-upinstructionsROM loads the OS from storage
  • ROM (read-only memory) is non-volatile: it keeps its contents with the power off.
  • It can only be read. Its contents cannot normally be changed.
  • ROM holds the start-up instructions (the BIOS or boot program). They load the operating system from secondary storage into RAM.
RAMROM
Keeps data with power off?No (volatile)Yes (non-volatile)
Can be changed?Read and writeRead only
HoldsOperating system, open programs and data in useStart-up instructions
SizeGigabytesSmall
Quick check
?A washing machine's wash programs must never be lost and must not be changed by the user. Where should they be stored?
Hardware · primary memory

Registers and cache

Memory hierarchyRegistersCacheRAMROMSecondary storagemainmemory /primarystoragebelow the line: not directly accessed by the CPUfaster,smaller,more costlyper byte
  • Registers are tiny memory locations inside the CPU holding the instruction, data or address in use right now.
  • Cache is small, very fast memory on or near the CPU. It holds copies of frequently used instructions and data, so fewer slow trips to RAM are needed.
  • Both are volatile. The faster the memory, the more it costs per byte, so fast memory is kept small.
Hardware · primary memory

Virtual memory

Virtual memoryRAM: 8 page slots, all fullAABBCCDDApp E opensB’s pages move out; E loads into the freedslotsAAEECCDDvirtualmemoryBBpage outpage swapped back in when B is selectedvirtual memory is on secondary storage: slow
  • When RAM is full, the operating system uses part of secondary storage as virtual memory.
  • Data and programs not needed right now are moved out of RAM to virtual memory in blocks called pages, freeing space.
  • When they are needed again, pages are swapped back into RAM.
  • Secondary storage is much slower than RAM, so heavy swapping slows the computer down. Adding more RAM is the fix.
Quick check
?A computer has many apps open and becomes very slow when switching between them. What is the most likely cause?
Your answer
?What word describes memory that loses its contents when the power is switched off?
Mission check

?Pull the plug and unsaved work is gone. So how does it boot?
Mission 2

One storage firm runs 300,000+ spinning hard disks. Why not SSDs?

Make a guess: One storage firm runs 300,000+ spinning hard disks. Why not SSDs?

Hardware · secondary storage

Why secondary storage?

  • Secondary storage is non-volatile: it keeps the operating system, programs and files with the power off.
  • It holds far more than RAM, for much less money per gigabyte.
  • The CPU does not access it directly. Programs and data are copied into RAM (main memory) first.
  • To choose a device, compare its capacity, speed, portability, durability, reliability and cost.
Hardware · secondary storage

Magnetic storage

Hard disk driveInside a hard diskread/write headplattersspindlearmThe head floats just above the platter: it never touches it.Top viewtracksectorMagnetised regions: one direction = 1, the other = 010110010
  • A hard disk drive (HDD) stores data on spinning magnetic platters.
  • Platters are divided into circular tracks, split into sectors.
  • A moving read/write head uses an electromagnet to magnetise tiny areas (one way for 1, the other for 0) and to read them.
  • Moving parts: slower, and easily damaged if dropped. But huge and cheap per gigabyte.
Hardware · secondary storage

Solid-state storage

Solid-state storageFlash memory cellsSSDSD cardUSB driveflash memory: no moving parts
  • Solid-state storage uses flash memory: electrical circuits that keep data with the power off. No moving parts.
  • Examples: SSD (solid-state drive), SD card, USB flash drive.
  • Fast, light, low power and robust. But it costs more per gigabyte, and cells wear out after many rewrites.
Hardware · secondary storage

Optical storage

Optical storageDisc surface (side view)landpitlasersensorland: light reflects back to thesensorpit edge: lightscattersCapacity (to scale)CD0.7 GBDVD4.7 GBBlu-ray25 GB
  • A laser reads the surface of a spinning disc. Pits and lands reflect the light differently, giving 1s and 0s.
  • To write, a laser changes the surface of a recordable disc.
  • Examples: CD (about 700 MB), DVD (4.7 GB), Blu-ray (25 GB per layer).
  • Cheap and light to post, but low capacity, slow and easily scratched. Downloads and flash drives have largely replaced it.
Calculate
?A 4,000 GB hard disk costs £80. A 2,000 GB SSD costs £120. How many times more does the SSD cost per gigabyte?
Quick check
?A travel photographer copies 60 GB of photos a day to a small device kept loose in a rucksack. Which is the best choice?
Mission check

?One storage firm runs 300,000+ spinning hard disks. Why not SSDs?
Recap

Big ideas

  • RAM is volatile and holds what is in use now; ROM is non-volatile and holds the start-up instructions.
  • Registers and cache are small, fast, volatile memory close to the CPU.
  • When RAM is full, virtual memory on secondary storage takes the overflow, but swapping is slow.
  • Secondary storage is non-volatile and keeps data for the long term; choose it by capacity, speed, portability, durability, reliability and cost.
  • Magnetic: huge and cheap per gigabyte, but moving parts. Solid state: fast and robust, but dearer per gigabyte.
  • Optical discs are read by a laser (pits and lands): cheap but low capacity.
🏆

Mini-lesson complete!

⭐⭐⭐

You've worked through Memory and storage for OCR GCSE Computer Science (J277). 🎉

  1. Mission 1Pull the plug and unsaved work is gone. So how does it boot?
  2. Mission 2One storage firm runs 300,000+ spinning hard disks. Why not SSDs?

Your stars: 0 / 0

Next: test yourself in the Verify stage.

📣 Smashed it? Share your score

Challenge a mate to beat your stars, or show a parent how you got on.

→ Back to GCSE Computer Science · OCR

Specification points and sources for this lesson are listed at the bottom of the page.

Sources (3)

The specification points and sources behind this lesson.

  1. 1 OCR J277 spec v3.1, 1.2.1
  2. 2 OCR J277 spec v3.1, 1.2.2 (and 1.3.1 for The Cloud)
  3. 3 Backblaze, "Backblaze Publishes 2025 Drive Stats Report" (press release, 2026): https://ir.backblaze.com/news/news-details/2026/Backblaze-Publishes-2025-Drive-Stats-Report-13-Years-of-Data-Show-a-Growing-Healthier-Drive-Fleet/default.aspx