Home / GCSE · Edexcel / Computer Science / Computers

CPX9Secondary Storage and Embedded Systems

Edexcel 1CP2 · 3.1.2

Why secondary storage is needed

Secondary storage provides long-term, non-volatile storage for programs and data that must be kept when the power is lost or interrupted.

  • Main memory (RAM) is volatile: everything in it is lost when the computer is switched off.
  • Secondary storage keeps the operating system, applications and the user’s files, ready to be loaded into RAM when needed.
  • It has a far larger capacity than RAM and costs much less per gibibyte.
  • The CPU doesn’t run programs straight from secondary storage: they are copied into main memory first.
  • There are three types: magnetic, optical and solid-state. Cloud storage also exists, but you don’t need to know how it works.
Secondary storage
Long-term, non-volatile storage for programs and data that must be kept when the power is lost or interrupted.
Edexcel 1CP2 · 3.1.2

Magnetic storage

A magnetic hard disk drive (HDD) is a mechanical device with moving parts.

  • Data is stored on platters: discs coated with a magnetic material that spin at high speed.
  • A read/write head on an arm moves across the platter to the right track.
  • Writing: the head magnetises tiny regions of the surface in one of two directions. One direction represents 1 and the other 0.
  • Reading: the head detects the direction of magnetisation of each region as it passes underneath, and turns it back into 1s and 0s.
  • Moving parts mean: slower access (the head has to move and wait for the right part of the platter to spin round); damage if dropped or knocked while running; parts wear out.
  • Files can become fragmented (stored in pieces in different places), which slows reading because the head has to move more.
  • Strengths: very high capacity at a low cost per GiB. Magnetic tape is also used for large archives and backups.

Inside a hard disk drive, and how magnetised regions represent bits.

Platter
A spinning disc in a hard drive, coated with magnetic material.
Read/write head
The part on a moving arm that magnetises the platter to write and detects magnetisation to read.
Edexcel 1CP2 · 3.1.2

Optical storage

CDs, DVDs and Blu-ray discs are optical storage. The disc has a reflective surface.

  • Writing: a laser burns pits into the reflective surface. Areas that are not burnt are called lands. The pattern of pits and lands represents the binary data.
  • Reading: a laser is shone at the spinning disc. Lands reflect the light back to a sensor; pits scatter it. The sensor turns the pattern of reflections into 1s and 0s.
  • Strengths: cheap to make in bulk, light and easy to post, readable in many players.
  • Weaknesses: small capacity compared with hard drives and SSDs; slow access; scratches can stop the laser reading the data; most discs can be written only once.
  • Uses: selling films, music and software; distributing data that must not be changed.

Pits scatter the laser light; lands reflect it to the sensor.

Exam tipAsked how data is stored on an optical disc? Describe writing: a laser burns pits, leaving lands, which represent 1s and 0s. Examiners found many students only described reading.
Pit
A tiny area burnt into an optical disc by a laser. It scatters light when read.
Land
A flat, unburnt area of an optical disc. It reflects light when read.
Edexcel 1CP2 · 3.1.2

Solid-state storage

Solid-state drives (SSDs), USB flash drives and memory cards are solid-state (flash) storage.

  • Data is stored as electrical charges held in electrical circuits. The charge stays when the power is off, so it is non-volatile.
  • There are no moving parts.
  • So it is: fast to access (no head to move or disc to spin); robust (not damaged by drops or vibration); silent; small and light; uses little power.
  • Not affected by fragmentation: every location can be reached equally quickly, so it doesn’t matter if a file is stored in pieces.
  • Weaknesses: costs more per GiB than magnetic storage; each cell can be rewritten only a limited number of times.
  • You don’t need to know the physics of how the circuits hold the charge.
Solid-state storage
Non-volatile storage with no moving parts that stores data as electrical charges in circuits.
Edexcel 1CP2 · 3.1.2

Comparing and choosing storage

To choose storage for a purpose, compare capacity, speed, portability, durability and cost, and link each point to the scenario.

  • Devices that move, are carried or run on batteries (phones, cameras, wearables, drones): solid-state.
  • Huge amounts of data that stay in one place, where cost matters (servers, backups, archives): magnetic.
  • Copies to sell or send out cheaply, where nobody should change the data: optical.
Magnetic (HDD)Optical (disc)Solid-state (SSD, flash)
CapacityVery highLowHigh
Access speedMedium (moving parts)SlowFast
DurabilityDamaged by knocks while runningScratches easilyRobust: no moving parts
PortabilityHeavier, needs careLight, but discs need a driveSmall and light
Cost per GiBLowVery low per discHigher
Power useHigher (motor)Needs a driveLow
Worked exampleA cycle courier wears a helmet camera that records each ride. Which type of storage should the camera use?
  1. The camera is worn while riding, so it is shaken and may be droppeddurability
  2. It runs on a small battery and must be lightpower and portability
  3. Solid-state has no moving parts, uses little power and is smallmatch the features to the needs
Solid-state, e.g. a memory card: robust, light and low power.
Exam tip“It’s faster” or “it’s cheaper” needs a comparison and a reason linked to the context: “solid-state has no moving parts, so the camera can be knocked without damaging the data”.
Edexcel 1CP2 · 3.1.3

What an embedded system is

An embedded system is a computer system built into a larger device to perform a specific task or control a specific function.

  • A general-purpose computer (laptop, desktop, smartphone) can run many different programs chosen by the user. An embedded system runs one fixed program for its device.
  • Typical characteristics compared with a general-purpose computer:
  • • limited processing power, because the task is simple;
  • • low power consumption;
  • • a simple operating system, or none;
  • • low cost per unit, so it can be fitted to millions of devices;
  • • small size;
  • • little storage, often holding just its own program;
  • • a limited user interface (a few buttons, a small display) or none.
Exam tipIf the question already says the system does a specific task, don’t give that back as a characteristic. Use one from the list instead, such as low power consumption or low cost per unit.
Embedded system
A computer system built into a larger device to perform a specific task or control a specific function.
General-purpose computer
A computer that can run many different programs chosen by the user, e.g. a laptop.
Edexcel 1CP2 · 3.1.3

Microcontrollers, sensors and actuators

  • A microcontroller is an integrated circuit with a processor, memory and input/output peripherals on a single chip. Most embedded systems are built around one.
  • Sensors are inputs: they measure something in the world, such as temperature, light, pressure, movement or moisture.
  • Actuators are outputs that make something happen physically, such as a motor, pump, valve or heater. Displays, lights and buzzers are other outputs.
  • The program is stored in non-volatile memory on the chip, so it runs as soon as the device is switched on.
  • Power consumption is a major design consideration: many embedded systems run on batteries for months or years, so they use low-power chips and sleep between readings.

Sensors feed the microcontroller; the microcontroller drives the actuators.

Microcontroller
An integrated circuit with a processor, memory and input/output peripherals on a single chip.
Sensor
An input device that measures a physical quantity, e.g. light or temperature.
Actuator
An output device that makes something move or happen, e.g. a motor or valve.
Edexcel 1CP2 · 3.1.3

Uses of embedded systems

  • Household appliances: microwaves, dishwashers, fridges, central heating.
  • Consumer electronics: TVs, cameras, games controllers, smart watches.
  • Vehicles: engine management, anti-lock brakes, airbags, parking sensors.
  • Medical devices: pacemakers, insulin pumps, patient monitors.
  • Aerospace and manufacturing: flight controls, robots on production lines, traffic lights.
  • To outline how an embedded system does a task, say: what the sensor measures; how the microcontroller processes it (e.g. compares it with a set value, again and again); what the actuator or output then does.
Worked exampleOutline how an embedded system in an automatic bathroom fan could switch the fan on when someone has a shower.
  1. A humidity sensor measures how damp the air isinput
  2. The microcontroller repeatedly compares the reading with a set levelprocessing
  3. If the reading is above the level, it switches on the fan motor; when it drops, it switches it offactuator
Sensor → compare with a threshold in a loop → switch the actuator.
Exam tipAnswer about the device in the question. Examiners gave no credit for copying labels from a picture: describe what is measured, decided and controlled.
Edexcel 1CP2 · 3.1.3

The Internet of Things

The Internet of Things (IoT) is the network of everyday devices with embedded systems that connect to the internet to send and receive data.

  • Examples: smart speakers, video doorbells, smart plugs and lights, heating controls, fitness wearables, connected cars, sensors in farms and factories.
  • Benefits: control and monitor devices from anywhere; devices can work together automatically; data helps save energy or spot faults early.
  • Privacy concerns: devices collect personal data (when you are home, what you say, where you go, your health) that could be shared, sold or seen by others.
  • Security concerns: many devices have weak default passwords or are rarely updated, so hackers can take control, spy through cameras and microphones, or use the device as a way into the home network.
  • How personal data should be protected by law is covered in the topic on environmental, ethical and legal issues.
Exam tipMake each concern specific to the device: “the baby monitor’s camera could be accessed by a hacker, who could watch the family” beats “it could be hacked”.
Internet of Things (IoT)
Everyday devices with embedded systems that connect to the internet to send and receive data.