Skip to the page
Year 10 · Computer Science · Spring 1 · Hardware

Storage: primary, secondary, off-line; virtual memory; cloud

What this lesson covers

3.3 Data storage

Cambridge IGCSE Computer Science 0478 · Topic 3: Hardware · Paper 1

You will learn to

  • Describe RAM and ROM, and explain why a computer needs both.
  • Describe how magnetic, optical and solid-state storage store data.
  • Explain what virtual memory is and why it is needed.
  • Compare cloud storage with local storage, giving advantages and disadvantages.

Success criteria

  • I can say which storage uses pits and lands, and which uses magnetised areas.
  • I can choose storage for a laptop, a film archive and a camera, with a reason.
  • I can explain what happens when RAM is full and virtual memory is used.
The syllabus points for this section
  • Describe RAM and ROM and explain why a computer needs both.
  • Explain why secondary storage is needed.
  • Describe how magnetic, optical and solid-state storage work.
  • Explain virtual memory and why it is needed.
  • Give advantages and disadvantages of cloud storage compared with local storage.

Key words

Say each word, then read what it means. Every one is in the glossary too.

CPU
The central processing unit, which processes instructions and data by fetching, decoding and executing them.
Control unit
Manages the fetch–decode–execute cycle and sends control signals.
Instruction set
The list of all the instructions a particular CPU can carry out.
Sensor
An input device that measures a physical property and sends the reading to a computer.
Volatile
Loses its contents when the power is switched off.
Virtual memory
Part of secondary storage used as extra RAM, with pages moved between them.
IP address
An address given to a device on a network so data can be sent to it.

The explanation

Read it here, or open the study page below to go one step at a time with things to try.

Primary storage: RAM and ROM

Primary storage is memory the CPU can access directly. It includes RAM and ROM.

RAM (random access memory) holds the data and programs currently in use, including parts of the operating system. It can be read and written. It is volatile: everything is lost when the power goes off.

ROM (read-only memory) holds the start-up instructions (the bootloader firmware) that run when you switch on. It can only be read. It is non-volatile: it keeps its contents without power.

RAMROM
Volatile?Yes: loses data without powerNo: keeps data without power
Read / write?Read and writeRead only
What it holdsPrograms and data in use nowStart-up instructions (bootloader)
Size in a laptopLarge, e.g. 16 GiBSmall, e.g. a few MiB
?Why?

Both are needed. RAM is fast and changeable, so programs can run and data can change. But RAM is empty at switch-on, so ROM must hold the instructions that start the computer and load the operating system.

Secondary storage

Secondary storage is non-volatile storage that the CPU does not access directly. Data is copied into RAM first.

It is needed to keep files, programs and the operating system when the power is off. It also holds far more than RAM, for less money per gigabyte.

There are three types: magnetic, optical and solid-state.

Magnetic storage: the hard disk drive

A hard disk drive (HDD) has metal or glass platters coated with a magnetic material. They spin very fast, for example 7,200 times a minute.

A read/write head on a moving arm floats a tiny distance above each surface. To write, it magnetises tiny areas in one direction for 1 and the other direction for 0. To read, it senses the direction.

Each platter is divided into tracks (circles) and sectors (slices of each track). Data is found by moving the head to the right track, then waiting for the right sector to spin past.

AdvantagesDisadvantages
Large capacity, cheap per gigabyteMoving parts can break if dropped
Can be rewritten many times without wearing outSlower to access data than solid-state (head must move, disk must spin)
Good for servers and backupHeavier, noisier and uses more power

Optical storage: CD, DVD and Blu-ray

An optical disc has a single spiral track with tiny dips called pits and flat areas called lands.

A laser shines on the spinning disc. Lands reflect the light back strongly; pits scatter it. A sensor reads these changes as 1s and 0s.

To write a recordable disc, a stronger laser changes small areas of a dye layer, so they reflect differently.

DiscLaserTypical capacity (one layer)
CDRed700 MB
DVDRed4.7 GB
Blu-rayBlue (shorter wavelength)25 GB
?Why?

Blue light has a shorter wavelength, so it can focus on smaller pits. Smaller pits packed closer together means more data on the same size disc.

!Watch out

Optical discs are cheap and portable, but slow, easily scratched and small compared with modern drives. They are used for films, games and software distribution.

Solid-state (flash) storage

Solid-state storage has no moving parts. It stores data in flash memory chips using transistors.

Each cell has a control gate and a floating gate. Electric charge (electrons) can be trapped in the floating gate. Charge trapped, or not, stands for a 0 or a 1, and stays without power.

Flash memory is built using NAND or NOR technology. NAND is denser and cheaper, so it is used in SSDs, SD cards and USB flash drives.

AdvantagesDisadvantages
Very fast access: no head to moveMore expensive per gigabyte than HDD
No moving parts: survives knocks and dropsEach cell can only be written a limited number of times
Light, small, silent, low power: good for phones and laptopsUsually smaller capacity for the same price
e.g.Example
SSD in a laptop; SD card in a camera; USB flash drive for school work; flash chip in a phone.

Virtual memory

When RAM is full, the computer can use part of secondary storage as if it were extra RAM. This is virtual memory.

Data is split into fixed-size blocks called pages. Pages that are not needed right now are moved from RAM to virtual memory. When they are needed again, they are moved back into RAM.

It is needed so the computer can run more programs, or larger programs, than RAM can hold. Without it, programs could crash or refuse to open.

e.g.Example
A student has a browser with 40 tabs, a video editor and a game open on a laptop with 8 GiB of RAM. The tabs not being viewed are moved out to the SSD. Clicking an old tab brings its pages back into RAM, which causes a short pause.
!Watch out

Virtual memory is much slower than RAM. If pages are swapped in and out all the time, the computer becomes very slow. Adding more RAM is the real fix.

Cloud storage

Cloud storage keeps your files on remote servers owned by a company, which you reach over the internet.

The servers are real, physical computers in large data centres. Your data is usually copied onto several servers in case one fails.

Local storage means a drive you own and keep with you, such as a laptop's SSD or a USB drive.

Cloud: advantagesCloud: disadvantages
Access files from any device, anywhere with internetNo internet connection means no access
Easy to share and work on files with othersSecurity and privacy depend on the provider; data can be hacked
Provider handles backups and copies; less risk of losing dataMonthly fees for large amounts of storage
Buy more space whenever you need it; no hardware to buyUploading and downloading large files can be slow

Study it

Open the study page and go one step at a time.

The steps for this lesson

The maths

Symbols first, then the words, then the equation. Change the numbers to try your own.

Check yourself

One question at a time. The reason shows after each answer.

Saved on this device.