4.7.4.2 - Secondary storage technologies
Files need storage that retains them after power is removed, and different technologies meet different access and capacity requirements. In 4.7.4.2 you will explain magnetic, optical and solid-state storage, including NAND pages and blocks, then compare their suitability for real tasks.
Why secondary storage is needed
Secondary storage retains programs and data beyond the current processing session.
Secondary storage
Secondary storage is non-volatile storage used to retain programs and data for later use, normally accessed through a storage device/controller rather than as the processor's working registers or main-memory locations.
RAM is fast working memory, but its contents are normally lost when power is removed and its capacity is finite. A computer therefore saves files, installed programs and other persistent data on secondary storage. To run an ordinary program, its instructions and working data are loaded into main memory. Saving a document transfers its current data to persistent storage; simply displaying or editing it in RAM does not ensure it will survive a power loss.
Capacity is the amount of information the medium can retain. Access latency is the delay before a requested transfer can begin. Transfer rate is the amount of data moved per unit time once the transfer is under way. A device can have good sequential transfer rate but significant delay when moving between many small files. These are separate characteristics, so saying only that a device is “fast” can hide the access pattern that matters.
Keeping data on a single non-volatile device is not the same as keeping a backup. Device failure, accidental deletion or corruption can still destroy the retained copy. Reliability and the ability to recover from failure matter alongside speed and capacity.
Magnetic and optical operation
Magnetic and optical disks both retain data, but detect different physical properties of their recording surfaces.
A hard disk drive (HDD) has rotating platters with a magnetic coating. Data is organised in tracks and sectors. A movable read/write head selects the required track, and rotation brings the required sector beneath it. Writing changes magnetic patterns; reading detects the recorded magnetic changes and the controller decodes them into data. The head normally operates very close to the surface without touching it.
Moving the head introduces seek time, and waiting for the sector introduces rotational latency. Reading a large sequential file reduces the need for repeated seeks compared with many scattered small accesses. HDDs can provide large capacities for bulk files and archives. Moving parts make mechanical shock, especially during operation, a concern. Suitability also depends on the particular drive's quoted capacity, transfer speed, reliability and cost.
An optical disk is read using a laser focused on its recording layer. A detector receives reflected light; differences caused by the encoded surface/layer are interpreted as stored data. On a manufactured read-only disk, the pattern is formed using pits and lands. Do not assume that one pit simply means binary 1 and one land means 0: the drive decodes the optical pattern using its recording format. Recordable media change a recording layer, for example a dye, using a writing laser; rewritable media use a reversible material change. These media differ in whether and how often their data can be changed.
Optical disks are removable and can distribute a fixed set of files to a compatible drive without leaving a whole computer attached. Their capacity depends on the format and number of layers. Access normally involves mechanical positioning/rotation and is much slower than SSD access. Scratches or degradation can make a disk unreadable, and the receiving system needs a compatible optical drive. A write-once disk suits a fixed distribution copy but not a database updated continually.
NAND flash and the SSD controller
An SSD uses electronic flash storage and a controller, so it does not wait for a platter or head to move.
For the specification's NAND-flash model, floating-gate transistors trap and retain charge. Stored charge changes how a cell conducts when read, allowing its stored state to be detected without continuous power. Programming and erasing change that state electronically. An SSD combines NAND flash with a controller that maps the computer's requests to physical storage and manages the difficulties of writing.
NAND is organised into pages, grouped into blocks. Data is read and programmed in page-sized units, but erasure operates on a whole block. A previously programmed page cannot simply be overwritten with arbitrary new data. Its cells need an erased state for new programming, and the technology requires the containing block to be erased. Erasing that block also removes the data in its other pages, so a controller must preserve any still-valid data.
Imagine a block with four pages containing A, B, C and D. To update B, the controller can write the new version B′ into an already erased spare page and update the mapping, leaving the old B obsolete. Before it later erases the old block for reuse, it copies any still-valid A, C and D to suitable free pages. This is a conceptual example of why the controller needs spare space, mappings and background management. It is not four independent page erases. Reading an existing page does not require erasing it first.
Repeated programming/erasing wears flash cells. The controller can distribute writes across blocks (wear levelling), manage obsolete data and handle errors. This helps reliability but does not give an SSD infinite life or remove the need for backups. The visible logical address of a file's data can stay the same even when the controller stores its new version in a different physical page.
With no moving head or platter, an SSD generally has lower access latency and faster transfers than a magnetic drive, especially for scattered small accesses. It is also less vulnerable to mechanical shock during use, making it suitable for portable devices. Its actual endurance, capacity, interface speed and price still need checking for the workload. Solid-state storage is not volatile RAM merely because both use electronic components.
Comparing storage for an application
A suitable medium meets the required capacity and access pattern under the application's practical constraints.
Start with whether the data fits. Then distinguish frequent small random accesses from long sequential transfers, and consider how often the data changes. A working laptop drive must respond quickly to many file requests; an archive may prioritise total capacity and recovery arrangements. A distribution disk must be readable by the recipient and suit whether the contents are fixed. Portability, shock resistance, durability, cost and backup arrangements can change the choice.
Use supplied measurements or actual quoted device data rather than claiming every SSD, HDD or optical disk has one fixed capacity. The following is an original simplified comparison, not a product catalogue:
| Candidate | Capacity | Sequential transfer rate | Relevant condition |
|---|---|---|---|
| Magnetic drive | 4 TB | 150 MB/s | Moving head and platter |
| SSD | 500 GB | 450 MB/s | No moving parts |
| Write-once optical disk | 25 GB | 12 MB/s | Compatible drive needed; fixed content |
A 3 TB archive fits on the magnetic candidate but not on either other single candidate. The SSD's higher rate does not compensate for insufficient capacity. A portable 200 GB working set fits both the magnetic drive and SSD; the SSD offers lower latency/no mechanical seeks and better resistance to mechanical shock. The optical candidate cannot hold it on one disk.
When a task asks for a simplified transfer time, use consistent units and the stated rate. At 150 MB/s, transferring a 3000 MB file takes seconds, ignoring access/start-up delays. At 450 MB/s the same transfer takes about 6.67 seconds. This estimates sequential transfer only: it does not measure the time to open thousands of scattered files, and it must not ignore a latency term that the task explicitly supplies.
Support a storage recommendation with the application's size, access pattern and conditions. Explain the mechanism behind the advantage and acknowledge any requirement the candidate fails.