You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Secondary storage is the non-volatile layer that holds programs, files and the operating system when the power is off. This lesson examines the operating principles of the three families the spec names — magnetic, optical and solid-state — at a genuine physical level, and weighs their durability and use-cases.
This lesson develops OCR H446 section 1.1.2 (memory and storage) as it concerns secondary storage. It covers the operating principles of magnetic storage (HDD platters, tracks/sectors, read/write heads), optical storage (CD/DVD/Blu-ray pits and lands, and how laser wavelength sets data density), and solid-state storage (NAND flash, floating-gate cells, wear levelling), together with each family's durability and typical uses. It links to the memory hierarchy (1.1.2), to virtual memory in the software-systems memory-management lesson, and forward to the dedicated storage-comparison lesson that quantifies capacity, speed and cost.
Primary storage (RAM) is volatile: it loses everything when power is removed, and it is small and expensive per gigabyte. Secondary storage is non-volatile — it retains data indefinitely until deliberately overwritten — and it is far cheaper per gigabyte, at the cost of being much slower and not directly addressable by the CPU (data must be loaded into RAM first). It therefore holds everything that must survive a power-off: the OS, applications, documents and media. Three physical principles dominate: magnetism, reflected light, and trapped electric charge.
An HDD stores data by magnetising tiny regions of one or more rapidly spinning platters coated in a ferromagnetic material. A read/write head on the end of a moving actuator arm floats a few nanometres above each surface on a self-generated cushion of air, never touching it.
flowchart TB
SP["Spindle motor"] --> P["Stack of spinning platters<br/>(ferromagnetic discs)"]
AA["Actuator arm"] --> RH["Read / write head<br/>(floats nm above surface)"]
RH -. "reads/writes magnetic polarity" .-> P
P --> TRK["Each surface = concentric tracks"]
TRK --> SEC["Each track = sectors<br/>(smallest addressable unit)"]
| Term | Definition |
|---|---|
| Platter | A rigid circular magnetic disc; both surfaces store data |
| Track | A concentric ring on a platter surface |
| Sector | A segment of a track — the smallest addressable unit (typically 512 B or 4 KB) |
| Cylinder | The set of identically positioned tracks across all platters |
| Read/write head | Senses or sets the magnetic polarity of regions on the surface |
| Actuator arm | Swings the heads to the correct track |
Because reaching a given byte means moving the head to the right track and waiting for the platter to spin the right sector underneath, an HDD is intrinsically slow at random access — the physical, mechanical nature of the device is the root cause, and it is the single biggest contrast with solid-state storage.
| Factor | Description |
|---|---|
| Seek time | Time for the head to move to the target track (≈ 5–15 ms) |
| Rotational latency | Time for the platter to bring the target sector under the head (depends on RPM) |
| Data transfer rate | Sustained read/write speed once positioned |
| RPM | Revolutions per minute — faster spin = lower latency (5400, 7200, 10000) |
We can make rotational latency concrete. A drive spinning at 7200 RPM completes one revolution in
720060000 ms≈8.33 ms,
so the average rotational latency (half a turn) is about 4.17 ms. Add ~9 ms of seek time and a single random access can cost over 13 ms — an eternity beside an SSD's ~0.1 ms, and the quantitative reason HDDs feel sluggish for random workloads.
Once the head is in position, what matters is the transfer rate. Estimating how long a large sequential read takes is a common calculation: time equals data size divided by transfer rate. To copy a 12 GB video file from an HDD that sustains 150 MB/s:
150 MB/s12000 MB=80 s.
The same file from an NVMe SSD at 3,000 MB/s takes 12000/3000=4 s — twenty times faster. Note that for one big sequential file the seek and rotational latency (a few ms) are negligible against the 80 s transfer; it is random access to many small files, where each one pays the seek+latency penalty, that exposes the HDD's mechanical weakness most brutally. Separating these two cases — sequential transfer dominated by transfer rate, random access dominated by access time — is exactly the distinction the comparison lesson builds on.
Because an HDD is built from a fixed number of platters, tracks and sectors, its capacity is just their product — a calculation exam questions sometimes set. Total capacity is
capacity=surfaces×tracks/surface×sectors/track×bytes/sector.
For a (deliberately small, illustrative) drive with 4 platters (so 8 surfaces), 50,000 tracks per surface, 1,000 sectors per track and 512 bytes per sector:
8×50000×1000×512=2.048×1011 bytes≈204.8 GB.
Modern drives reach tens of terabytes by packing far more tracks and sectors onto each surface — which is exactly what the density techniques in Going Further (SMR, HAMR) push further.
Because an HDD's access cost is dominated by physically moving the head, it matters where on the platters a file's sectors lie. When a large file is stored in scattered sectors across the disk — fragmentation, which builds up as files are created and deleted — reading it forces many separate seeks, dramatically slowing access. Defragmentation rearranges the sectors so each file is contiguous, restoring fast sequential reads. Crucially, this is a mechanical problem: an SSD has no head to move and uniform access time everywhere, so defragmenting an SSD is pointless and even harmful (it just consumes write endurance). Fragmentation is therefore a neat illustration of how an HDD's operating principle — moving parts — shapes how the OS must manage it.
The defining weakness is moving parts: a knock while spinning can cause a head crash (the head striking the platter and destroying data). HDDs are also heavier, noisier and run hotter than SSDs. Their decisive strength is capacity for the lowest cost per gigabyte, which keeps them dominant for bulk and archival storage, NAS boxes, surveillance recorders and data-centre cold storage.
| Advantages | Disadvantages |
|---|---|
| Very large capacity (20+ TB) at lowest cost/GB | Moving parts — vulnerable to shock and head crashes |
| Mature, well-understood technology | Slow, especially random access |
| Good for bulk/archive | Heavier, noisier, hotter than SSD |
The other magnetic medium still in serious use is magnetic tape: a long ribbon coated in ferromagnetic material, wound on reels inside a cartridge, on which a head magnetises regions exactly as on an HDD platter. Its defining property is that it is a sequential-access medium — to reach data near the end you must physically wind the tape past the head, so random access is dreadfully slow (seconds to minutes). That sounds like a fatal flaw, yet tape survives because for its one job — bulk backup and long-term cold archive — random access does not matter: you stream the whole backup on or off in order. Tape offers the lowest cost per gigabyte of any medium, very high capacity per cartridge, good archival longevity, and (being offline on a shelf) immunity to network attacks. It is the classic example of matching an operating principle (cheap, sequential) to a use-case (write-rarely, read-rarely archive), and a useful contrast to the random-access HDD: same magnetism, opposite access pattern.
Optical discs store data along a single spiral track as a sequence of pits (microscopic depressions burned or stamped into the surface) and lands (the flat areas between them). A laser is shone onto the spinning disc and a photodetector measures the reflected light:
Crucially, it is the change at a pit-to-land boundary that encodes a binary 1, while a run with no change encodes 0s — the data is in the transitions, not the absolute pit/land state. The pits spiral outward and the disc spins so they stream continuously past the laser.
Because a disc surface inevitably picks up dust, fingerprints and minor scratches, optical formats store data with built-in error-correcting codes (the same family of techniques that protect QR codes, met in the input lesson). Redundant information is interleaved across the disc so that a reader can reconstruct the original bytes even when a run of them is unreadable — which is why a lightly scratched CD or DVD usually still plays perfectly. Error correction is therefore not an optional extra on optical media but a core part of how reliable playback is achieved from an exposed, easily-marked surface.
The amount of data a disc holds is set largely by how small the pits can be, and that is limited by how tightly the laser can be focused — which depends on its wavelength: a shorter wavelength focuses to a smaller spot, so pits and the track spacing can be smaller, packing more data onto the same-sized disc.
| Format | Capacity (single layer) | Laser wavelength | Laser colour |
|---|---|---|---|
| CD | ~700 MB | 780 nm | Infrared |
| DVD | 4.7 GB | 650 nm | Red |
| Blu-ray | 25 GB | 405 nm | Blue-violet |
The progression is the whole story: 780 → 650 → 405 nm shrinks the focused spot, shrinking the pits, multiplying capacity from megabytes to tens of gigabytes — which is exactly why "Blu-ray" is named after its blue-violet laser. (This is the standout exam fact: shorter wavelength → smaller pits → higher capacity.)
| Type | Description |
|---|---|
| ROM (e.g. CD-ROM) | Pits stamped at manufacture; read-only. Used for mass distribution |
| R (recordable) | Written once by a laser burning marks into an organic dye layer |
| RW (rewritable) | Erasable and rewritable many times using a phase-change material whose reflectivity the laser switches |
How the writable variants differ is itself a tidy "operating principles" point. A pressed (ROM) disc has its pits physically stamped into the substrate at manufacture, so it can only be read. A recordable (R) disc has no pits; instead it carries an organic dye layer, and a more powerful "write" laser burns dark marks into the dye that reflect like pits — but the chemical change is permanent, so it can be written only once. A rewritable (RW) disc uses a special phase-change alloy that the laser can switch between a shiny crystalline state and a dull amorphous state; because those states reflect light differently and the switch is reversible, the disc can be erased and rewritten many times. So the same "read by reflected light" principle underlies all three, but how the reflective pattern is created — stamped pits, burnt dye, or switched phase — sets whether the disc is read-only, write-once or rewritable.
It is also worth noting that, unlike an HDD's concentric tracks, optical data follows one continuous spiral from the centre outward, and the disc typically spins under constant linear velocity (slowing the rotation as the laser moves outward) so that data streams past at a steady rate. This single-spiral, mechanically-spun design is part of why optical access is slow and sequential compared with the random access of a solid-state drive.
Optical media are cheap and light and pressed discs can archive well for decades, but they are easily scratched, have low capacity and slow transfer, and are now largely legacy. Their niche is physical distribution of films, games and software, archival "write-once" copies, and situations needing cheap, immutable read-only media.
| Advantages | Disadvantages |
|---|---|
| Very cheap per disc; highly portable | Low capacity vs HDD/SSD |
| Good for distribution; long archival life (pressed) | Slow; easily scratched; increasingly obsolete |
A solid-state drive has no moving parts: it stores data electronically in NAND flash, built from grids of floating-gate transistors. Each cell has an electrically isolated "floating" gate; trapping electrons on it (or not) is what represents the stored bit, and because the gate is insulated, the charge — and hence the data — persists without power (non-volatility).
| State | Floating gate | Represents |
|---|---|---|
| Programmed | Charge trapped | Binary 0 |
| Erased | No charge | Binary 1 |
Cells are organised into pages (the unit that can be written) grouped into blocks (the unit that must be erased). A quirk with big consequences: flash can be written a page at a time but can only be erased a whole block at a time, which is what makes wear levelling and TRIM necessary.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.