
Hard Disk Drive Architecture and Performance
Hard disk drives (HDDs) are the backbone of many storage systems. To master their performance you must grasp how data is organized on the platter, how the read/write head moves, and what…

If a file of 27 bytes is stored on a disk with an 8‑byte cluster size, how many bytes are wasted due to internal fragmentation?
Which of the following best describes external fragmentation on a hard disk?
A disk rotates at 10 000 RPM. What is the average rotational latency per I/O operation?
In the service‑time formula TI/O = Tseek + Trotation + Ttransfer + Tcontroller, which component is most affected by data locality?
Given a mean seek time of 6 ms, rotational latency of 3 ms, transfer time of 0.01 ms, and controller overhead of 0.2 ms, what is the mean I/O service time for a random sector access?
If data locality is 75 %, how does it modify the contribution of seek and rotation to the average service time?
Which disk scheduling algorithm is most prone to starvation of requests far from the current head position?
When a disk uses Native Command Queuing (NCQ), where does the reordering of requests primarily occur?
A file system stores metadata at fixed positions on the disk. What is the main advantage of this arrangement?
Understanding Hard Disk Drive Architecture
Hard disk drives (HDDs) are the backbone of many storage systems. To master their performance you must grasp how data is organized on the platter, how the read/write head moves, and what factors influence latency. This course breaks down the key concepts tested in the quiz, providing clear explanations, memorable mnemonics, and practical examples.
Internal Fragmentation: The Hidden Waste
What Causes Internal Fragmentation?
Internal fragmentation occurs when the file size is not an exact multiple of the cluster (or block) size. The file system allocates whole clusters, so any leftover bytes in the last cluster remain unused.
- Cluster size is a fixed allocation unit (e.g., 8 bytes, 4 KB).
- If a file occupies 27 bytes on an 8‑byte cluster disk, the system reserves 4 clusters (32 bytes).
- The difference—32 bytes − 27 bytes = 5 bytes—is wasted internal space.
Mnemonic: “4 × 8 = 32, 27 is the file, 32‑27 = 5”. Whenever the file size isn’t a multiple of the cluster size, round up to the next cluster and subtract the real size.
Why It Matters for Performance
Even a few wasted bytes per file can add up to significant storage loss on large systems. Moreover, internal fragmentation can increase the number of I/O operations required to read or write data, because the controller still has to handle the whole cluster.
External Fragmentation: Scattered Files
Definition
External fragmentation describes a situation where files are split into non‑contiguous clusters scattered across the disk. Unlike internal fragmentation, the waste is not inside a cluster but in the gaps between allocated clusters.
- When a file is written, the file system may place its clusters wherever free space exists.
- Over time, free space becomes fragmented, leading to longer seek times.
Mnemonic: “Seek & Spin” – if data is scattered, the head must seek farther and the disk must spin longer to find each piece.
Impact on I/O Performance
External fragmentation directly affects the Tseek and Trotation components of the service‑time formula, because the head must travel more distance and wait for the correct sector to rotate under it.
Rotational Latency: The Spin Delay
Calculating Average Rotational Latency
Rotational latency is the time the disk must spin to bring the desired sector under the read/write head. The average latency is half the time of a full rotation.
For a disk rotating at 10 000 RPM:
- One full rotation = 60 seconds ÷ 10 000 RPM = 0.006 seconds = 6 ms.
- Average latency = 6 ms ÷ 2 = 3 ms.
Mnemonic: “RPM → 60 s ÷ RPM = time per turn; half of that is the average wait.”
Why Rotational Latency Matters
Even with fast seek mechanisms, the disk cannot deliver data faster than it spins. Reducing RPM or using SSDs eliminates this component entirely, which is why modern storage often prefers solid‑state technology for latency‑critical workloads.
Service‑Time Formula: Breaking Down I/O Delay
The total I/O service time is expressed as:
TI/O = Tseek + Trotation + Ttransfer + Tcontroller
Component Overview
- Tseek: Time for the actuator arm to position the head over the correct track.
- Trotation: Average rotational latency (see above).
- Ttransfer: Time to move the data once the sector is under the head.
- Tcontroller: Overhead introduced by the disk controller and interface.
Data Locality’s Influence
Data locality—how close successive pieces of data are on the disk—primarily reduces Tseek and Trotation. When data is stored contiguously, the head moves less and the required rotation is smaller.
Mnemonic: “Seek & Spin” again—these two terms shrink with good locality, while Ttransfer and Tcontroller stay largely unchanged.
Calculating Mean I/O Service Time
Example Problem
Given:
- Mean seek time = 6 ms
- Rotational latency = 3 ms
- Transfer time = 0.01 ms
- Controller overhead = 0.2 ms
Plugging into the formula:
TI/O = 6 ms + 3 ms + 0.01 ms + 0.2 ms = 9.21 ms
This result matches the quiz answer, confirming the additive nature of the components.
Effect of Data Locality on the Formula
If data locality is 75 %, only 25 % of the original seek and rotation times are incurred on average. Therefore, the contribution of Tseek and Trotation is multiplied by 0.25.
Mathematically:
(Tseek + Trotation) × (1 – locality) = (6 ms + 3 ms) × 0.25 = 2.25 ms
The remaining components (Ttransfer and Tcontroller) stay unchanged.
Disk Scheduling Algorithms and Starvation
Shortest Seek Time First (SSTF)
SSTF selects the pending request that requires the smallest seek distance from the current head position. While this reduces average seek time, it can cause starvation for requests that are far from the head because the algorithm continually prefers nearer requests.
- Requests near the head are serviced quickly.
- Requests on the opposite side may wait indefinitely if new nearer requests keep arriving.
Other algorithms, such as SCAN (Elevator) or C‑LOOK, mitigate starvation by moving the head in a systematic direction, ensuring all pending requests are eventually reached.
Key Takeaways
- Internal fragmentation is caused by non‑multiple file sizes relative to cluster size; calculate waste by rounding up to the next cluster.
- External fragmentation spreads a file across non‑contiguous clusters, increasing
TseekandTrotation. - Average rotational latency = (60 s ÷ RPM) ÷ 2.
- The
TI/Oformula separates delay into seek, rotation, transfer, and controller components. - Good data locality reduces the seek and rotation terms, often by a factor of (1 – locality).
- When calculating service time, simply add the component values; adjust seek/rotation for locality when appropriate.
- SSTF offers low average seek time but can starve distant requests; SCAN‑type algorithms provide fairness.
Understanding these concepts equips you to evaluate HDD performance, choose appropriate scheduling policies, and design storage layouts that minimize wasted space and latency.
