Secondary storage provides long-term, non-volatile data storage essential for holding system software, user applications, and files after the power is turned off.
Hard Disk Drives (HDD)
Principles of Operation
Hard Disk Drives are electromechanical data storage devices that use magnetic storage to write and retrieve digital information. An HDD consists of one or more rotating platters, coated with a magnetisable material, which spin at very high speeds inside a sealed casing.
The platters are typically made from aluminium or glass and spin continuously while the drive is powered on.
Data is written to and read from the platters by a read/write head mounted on an actuator arm. Each surface of the platter has its own head.
These heads float nanometres above the platter’s surface on a thin cushion of air generated by the spinning disks. They never touch the platters during normal operation.
Data is written by changing the magnetic polarity of tiny regions of the platter’s surface, representing binary 1s and 0s.
To read data, the head detects the magnetic orientation of these regions as the platter spins underneath.
A key characteristic of HDDs is their reliance on mechanical movement to position the read/write head, resulting in seek time and rotational latency.
Characteristics
Practice Questions
FAQ
Solid-state drives slow down as they fill because of the way NAND flash memory handles data writing. SSDs cannot overwrite existing data directly. When space is available, data is written quickly to empty pages. As the drive fills, the controller must find and consolidate scattered blocks of stale and valid data—a process called garbage collection. This involves copying valid data to new locations and erasing blocks before reuse, which adds overhead and reduces write speed. Additionally, wear-levelling and error correction tasks increase as the drive ages, placing further strain on the controller. Over time, cells become worn due to repeated program/erase cycles, increasing latency. Some SSDs also throttle performance to maintain temperature limits. This cumulative effect leads to slower sustained write speeds, especially during large file transfers. Performance degradation becomes noticeable when drives reach around 75–90% capacity, so maintaining free space is critical for optimal long-term speed and responsiveness.
Wear-levelling is a technique used in SSDs to distribute write and erase cycles evenly across all memory cells. Flash memory has a limited number of program/erase cycles per cell—typically ranging from 3,000 to 100,000, depending on cell type (e.g. TLC, MLC, or SLC). Without wear-levelling, frequently written data would wear out specific blocks quickly, causing premature drive failure. The SSD’s controller maintains a map that tracks physical memory usage and dynamically remaps logical blocks to less-used physical locations. This ensures that no individual block is disproportionately overused. There are two main types: dynamic wear-levelling, which only moves active data, and static wear-levelling, which periodically moves even infrequently changed data. The process is transparent to the user and operating system. Wear-levelling extends the functional lifespan of the drive, maintains reliability, and prevents sudden data loss due to block failure. Without it, SSD durability and performance would be significantly reduced, especially under heavy or sustained workloads.
Optical discs continue to be used due to several unique advantages that remain relevant in specific contexts. Firstly, they offer low-cost distribution, especially for read-only media such as movies, music albums, and educational materials. Once written, data on standard discs like CDs, DVDs, and Blu-rays cannot be altered, making them useful for ensuring data integrity. Secondly, optical discs have good archival stability. When stored properly in cool, dark conditions, they can retain data for decades, especially archival-grade formats like M-Disc, which resist degradation. Unlike magnetic or electronic storage, they are immune to electromagnetic interference, making them suitable for long-term offline backups. Optical discs also provide a simple offline medium, reducing the risk of malware infection and cyberattacks that affect connected systems. Although they are slower and hold less data, these benefits make them valuable in legacy systems, air-gapped environments, and industries requiring secure, permanent data distribution.
The SSD controller acts as the brain of the solid-state drive, managing all communication between the computer and the NAND flash memory. It handles data placement, wear-levelling, garbage collection, error correction, encryption, and caching. When a file is saved, the controller determines where to store it to maximise speed and reduce wear. It maintains a logical-to-physical address map, allowing the operating system to access data efficiently. Advanced controllers support TRIM commands, which inform the drive about deleted data, improving garbage collection efficiency. The controller also uses error correction codes (ECC) to detect and fix bit errors, which are more common in NAND memory than in magnetic storage. The quality of the controller significantly influences read/write speed, drive longevity, and power consumption. Premium SSDs with sophisticated controllers deliver consistent performance under heavy workloads, whereas budget SSDs with simpler controllers may degrade quickly or suffer from unstable speeds during extended use.
NAND flash memory comes in several types based on how many bits each memory cell stores: SLC (Single-Level Cell), MLC (Multi-Level Cell), TLC (Triple-Level Cell), and QLC (Quad-Level Cell). SLC stores one bit per cell, offering the fastest speeds, highest endurance, and best reliability but is very expensive and used mostly in enterprise SSDs. MLC stores two bits per cell and balances cost and performance, making it common in mainstream consumer SSDs. TLC stores three bits per cell, allowing higher capacities at lower cost but with reduced write endurance and slower write speeds due to more complex voltage levels. It is widely used in budget and mid-range drives. QLC stores four bits per cell, further increasing storage density and lowering price but at the cost of significantly lower endurance and poorer performance, especially in write-intensive tasks. These differences mean users must choose SSDs based on their workload: high-write environments demand SLC or MLC, while casual users may opt for TLC or QLC.
