AQA 7517, section 4.7.4.2
The need for secondary storage
Main memory (RAM) is fast, but it has two limits:
- it is volatile: its contents are lost when the power is turned off;
- it is limited in size and expensive per gigabyte.
Secondary storage is needed to keep programs and data permanently (non-volatile), and in much larger amounts, even when the computer is off. The operating system, your files and your installed programs are all held in secondary storage, and loaded into RAM when they are needed.
You need to know three types of device.
Hard disk drive (HDD)
A hard disk stores data magnetically on spinning disks.
Principle of operation
- One or more platters (aluminium or glass disks coated with a magnetic material) spin at high speed (such as 5400 or 7200 revolutions per minute).
- Each surface is divided into circular tracks and each track into sectors.
- A read/write head on a moving arm floats just above the surface.
- To write, the head changes the magnetisation of tiny areas of the surface: one direction for 1 and the other for 0.
- To read, the head senses the direction of magnetisation as the surface passes under it.
- To reach data, the arm moves to the right track (seek time), and the disk spins until the right sector arrives (rotational latency).
Characteristics
- Large capacity (several terabytes) and low cost per gigabyte.
- Slower than an SSD, because of the mechanical parts, so there's a delay for seeking.
- Moving parts make it fragile (it can be damaged by knocks), noisy, and use more power.
- Suitable for bulk storage, backups, and archives, where capacity and cost matter more than speed.
Optical disk
An optical disk (CD, DVD or Blu-ray) stores data as a pattern that is read with a laser.
Principle of operation
- The disk has a spiral track with tiny pits (dents) and lands (flat areas).
- A low-power laser is focused on the track as the disk spins, and a sensor measures how much light is reflected back.
- Where the track continues (the laser stays on a land, or stays on a pit), the light is reflected back to the sensor.
- Where there is a transition (the edge between a land and a pit), the light is scattered, so less returns.
- A transition represents a 1, and a continuation represents a 0.
- Read-only disks (CD-ROM) have the pits pressed during manufacture.
- Recordable disks (CD-R, DVD-R) have a dye layer that the laser burns to make marks. Rewritable disks (CD-RW) use a material that can change between two states with heat.
- A Blu-ray uses a blue-violet laser with a shorter wavelength, so the pits can be smaller and closer together, giving more capacity.
Characteristics
| Disk | Typical capacity |
|---|---|
| CD | 700 MB |
| DVD | 4.7 GB (single layer) |
| Blu-ray | 25 GB (single layer) |
- Cheap to produce in bulk, portable, and light.
- Slow access and low capacity compared with other types.
- Can be scratched or damaged.
- Suitable for distributing software, music, films and games, and for small backups. Increasingly replaced by downloads and USB drives.
Solid-state drive (SSD)
An SSD has no moving parts. It stores data in flash memory.
Principle of operation
- It is made of NAND flash memory plus a controller that manages how data is stored.
- Each flash cell is a floating gate transistor, which traps and stores an electric charge. Whether the charge is present or not represents a 1 or a 0, and it stays even with the power off.
- Cells are grouped into pages, and pages into blocks.
- A page that already holds data can't be overwritten directly. It has to be erased first, but the technology can only erase a whole block at a time. So to change one page, the controller copies the block's useful data somewhere else, erases the block and rewrites it. The controller handles these complications, and spreads the writes around (wear levelling).
Characteristics
- Much faster than a hard disk: lower latency (no seek or spin delay) and faster transfer speeds.
- No moving parts: silent, robust (it can survive knocks), low power and light.
- More expensive per gigabyte, so capacities are often smaller for the same price.
- Each cell can only be rewritten a limited number of times, although in normal use this takes years.
- Suitable for laptops, phones and tablets, for operating system drives where speed matters, and for portable devices.
Comparison
| Hard disk | Optical disk | SSD | |
|---|---|---|---|
| Technology | Magnetic | Laser and pits/lands | Flash (floating gate transistors) |
| Capacity | Large (TBs) | Small (up to about 100 GB) | Medium to large (GBs to TBs) |
| Speed of access | Medium | Slowest | Fastest |
| Cost per GB | Low | Low (per disk) | Highest |
| Moving parts | Yes | Yes (spinning) | No |
| Durability | Fragile | Scratches easily | Robust |
| Portable | Some are | Yes | Yes |
| Typical use | Bulk storage, backups | Distribution of media | Computers and phones, fast storage |
Worked example
Task: recommend storage for (a) a laptop that needs to start quickly and survive being carried around, (b) a company's archive of 50 TB of old records, (c) a software company posting a game to customers.
- (a) An SSD: fast, so the system starts quickly, and robust because it has no moving parts.
- (b) Hard disks: they have the largest capacity at the lowest cost per gigabyte, and speed isn't critical for an archive.
- (c) An optical disk (DVD or Blu-ray): cheap to produce in bulk, light, and easy to post. (Today a download or a USB drive might be used instead.)
Exam tip: compare capacity, speed of access, cost, portability and durability, and link your recommendation to the situation. For SSDs, mention the floating gate transistors, and that a whole block must be erased before a page can be rewritten.
Check yourself
Why is secondary storage needed?
RAM is volatile and limited in size, so a computer needs non-volatile storage to keep programs and data permanently, in larger amounts, when the power is off.
How does an optical disk store data?
As a spiral track of pits and lands. A laser is shone on the track: a continuation of land or pit reflects the light back, but a transition between them scatters it. A sensor detects the reflected light; a transition is read as 1 and a continuation as 0.
Give two advantages of an SSD over a hard disk
Any two of: faster access and transfer; no moving parts, so more robust and silent; lower power use; lower latency.
Why can an SSD not simply overwrite a page of data?
A page must be erased before it can be written to, but the technology can only erase a whole block at a time, so the controller has to move the data and erase the block first.