For over five decades, magnetic Hard Disk Drives (HDDs) served as the primary secondary storage substrate in computer systems. While modern operating systems increasingly boot from solid-state flash memory, understanding mechanical disk geometry and head scheduling remains essential for studying physical latency modeling, mechanical movement optimization, and sequential data locality.
1. Physical Disk Geometry: Platters, Cylinders, and Sectors
For over half a century, the magnetic hard disk drive (HDD) served as the primary secondary storage substrate in computing. Although solid-state flash drives (SSDs) have surpassed magnetic disks in random transaction performance, mechanical disk drives remain the dominant medium for massive, exabyte-scale datacenter storage due to their favorable cost-per-terabyte profile.
From an operating system engineering perspective, magnetic disks provide a textbook case study in mechanical latency modeling, asymmetric access costs, and physical resource scheduling. To write efficient filesystem and buffer cache algorithms, kernel developers must understand the microscopic electro-mechanical physics governing disk hardware.
Figure 2.1: Electro-Mechanical Organization of a Modern Magnetic Hard Drive
Platter stacking, aerodynamic slider flying height, embedded servo sectors, and Zoned Bit Recording (ZBR).
Anatomy of the Mechanical Hard Disk
A modern hard disk drive is an ultra-precise, hermetically sealed unit containing several key mechanical and magnetic subsystems:
1. Platters & The Spindle Motor
The storage medium consists of one or more stacked, rigid circular disks called platters, fabricated from high-strength aluminum-magnesium alloys or specialized glass-ceramic substrates.
Key Structural Details:
Both the top and bottom surfaces of each platter are coated with a sub-micron sputtered magnetic thin film (cobalt-chromium-platinum alloys) protected by an atomic-layer diamond-like carbon (DLC) wear barrier.
The platters rotate together on a central spindle motor operating at a strict Constant Angular Velocity (CAV). Enterprise servers use drives spinning at 10,000 or 15,000 RPM, while consumer storage rotates at 5,400 or 7,200 RPM.
Enterprise drives replace internal air with Helium gas (which has one-seventh the density of air), dramatically reducing turbulent air drag, motor power consumption, and mechanical vibration across stacks of up to 10 platters.
2. Read/Write Heads & Voice-Coil Actuator
Data is sensed and recorded by microscopic electromagnetic read/write heads mounted on a shared rotary actuator arm driven by a high-speed Voice-Coil Motor (VCM).
The Physics of Head Flying Height:
The heads never physically touch the platter surface during operation. The rapid rotation of the platter generates an aerodynamic air cushion (an air bearing) that lifts the head slider, causing it to "fly" merely 5 to 10 nanometers above the spinning media.
For perspective, a single human hair is ∼75,000 nm in diameter, a smoke particle is ∼1,500 nm, and a fingerprint ridge is ∼600 nm. If a dust particle enters the chamber, it hits the head at 120 km/h, causing a catastrophic Head Crash that scrapes off the magnetic recording layer and permanently destroys data!
Modern heads use separate technologies: Tunneling Magnetoresistive (TMR) sensors for reading minute magnetic fluctuations, and inductive coils for writing.
The Geometry Hierarchy: Tracks, Cylinders, and Sectors
Data recorded on platters is organized along three geometric dimensions:
Tracks: Data is recorded along concentric circular rings called tracks. Unlike a vinyl phonograph record or an optical compact disc (which use a single continuous spiral), magnetic disk tracks are closed, discrete circles.
Track density is extraordinarily high, often exceeding 300,000 to 500,000 Tracks Per Inch (TPI). The width of an individual magnetic track is less than 50 nanometers!
Cylinders: The actuator arm moves all read/write heads simultaneously across all platter surfaces. The collection of all tracks across every platter surface situated at the identical radial arm distance forms an imaginary geometric vertical tube called a Cylinder:
The Cylinder Optimization Principle:
If a file spans multiple blocks, placing those blocks on the same cylinder across different platter surfaces allows the drive to switch from reading Head 0 to Head 1, 2, or 3 via purely electronic head-selection logic (consuming less than 0.5 milliseconds) without executing any physical, mechanical voice-coil movement!
Sectors: A track is partitioned into discrete arc segments called sectors. The sector is the smallest unit of physical storage and transfer that the disk controller can read or write atomically:
Legacy Standard (512-Byte Sectors): Historically, sectors stored exactly 512 bytes of user data.
Advanced Format (4Kn / 4096-Byte Sectors): Modern drives use 4 KB physical sectors. A 4096-byte sector reduces the overhead of inter-sector gaps and preambles, and significantly increases error-correction efficiency by providing larger data blocks for modern Low-Density Parity-Check (LDPC) error-correction codes.
The Evolution of Addressing: From CHS to Logical Block Addressing (LBA)
In early operating systems (such as MS-DOS and early Unix on IBM PCs), the kernel had to explicitly calculate and provide the 3-dimensional physical coordinates for every disk operation:
CHS addressing contained a fatal flaw: the combination of BIOS register limitations (10 bits for cylinders, 4 bits for heads, 6 bits for sectors) created the notorious 504 MiB Barrier:
Beyond the BIOS architectural limits, CHS was destroyed by basic physics: rigid geometry is geometrically inefficient.
Because a disk platter is circular, the circumference of an outer track is more than twice the circumference of an inner track:
$$\text{Track Circumference} = 2\pi r$$
Under historical CHS, every track was forced to contain the exact same number of sectors (e.g. 63 sectors per track). This meant magnetic bit transitions on outer tracks were spaced far apart, wasting massive amounts of surface area.
Modern drives implement Zoned Bit Recording (ZBR):
The disk surface is grouped into 16 to 30 concentric zones.
Outer zones (with larger radii) pack significantly more sectors per track (e.g. 1,200 sectors per track) than inner zones (e.g. 600 sectors per track), maintaining a uniform magnetic recording density across the entire platter.
Operating System Performance Consequence: Because the spindle motor rotates at a constant angular speed, outer tracks pass beneath the read/write heads faster, streaming data at more than double the throughput of inner tracks (e.g. 260 MB/s on outer tracks vs. 120 MB/s on inner tracks)! Operating system partition formatters deliberately place root filesystems and high-performance swap partitions on the outer edge of the disk.
The on-board disk controller firmware maintains an internal mathematical mapping table, translating logical LBA numbers to physical zones, cylinders, heads, and physical sectors.
Physical Latency Mitigations: Track and Cylinder Skewing
To prevent catastrophic rotational latency penalties during sequential reads, disk controllers implement microscopic angular offsets known as skewing:
Track Skewing
Suppose a sequential file spans Track 0 and Track 1. If Sector 0 on Track 1 is placed at the exact same angular position as Sector 0 on Track 0:
When the head finishes reading Track 0, it takes approximately 0.8 milliseconds for the actuator arm to mechanically step to Track 1.
During those 0.8 ms, the platter spins past Sector 0! The head lands over Sector 4, forcing the disk to wait almost an entire physical revolution (8.3 ms at 7200 RPM) just to read Sector 0!
The Solution: The controller offsets (skews) Sector 0 on Track 1 by several angular positions, ensuring that exactly as the head settles onto Track 1, Sector 0 spins directly underneath it.
Defect Management (G-List & P-List)
No physical platter is manufactured without microscopic silicon imperfections. Controllers maintain two defect lists:
1. Primary Defect List (P-List): Populated at the factory during low-level surface scanning. Defective sectors are skipped during initial track mapping (sector slipping).
2. Grown Defect List (G-List): When a sector fails in the field due to magnetic wear, the controller marks the sector bad and transparently remaps that LBA to an unallocated spare sector reserved on an inner or outer track.
OS Performance Impact: While remapping preserves data integrity, reading a remapped sector requires the actuator arm to seek to the spare track and back, causing sudden anomalous latency spikes during sequential reads.
2. Modeling I/O Access Latency (TI/O)
To an operating system kernel, secondary storage operations are enormously expensive compared to register and cache access. Reading a block of data from main DRAM requires tens of nanoseconds, whereas reading a block from a mechanical hard disk requires millions of nanoseconds.
To design effective disk scheduling algorithms and filesystem page caches, we must construct a rigorous mathematical latency model decomposed into its physical and electronic sub-components:
Figure 2.2: Time-Domain Decomposition of a Random 4 KB Disk Read Operation (~10.2 ms)
Visualizing how mechanical arm movement and platter rotation dwarf electronic transfer time by over 500 to 1.
1. Seek Time (Tseek): The Voice-Coil Mechanics
Seek time is the physical delay required for the voice-coil actuator arm to position the read/write heads radially across the platters and align precisely over the target cylinder.
An actuator movement is not an instantaneous, uniform velocity slide. The voice-coil motor must obey classical Newtonian mechanics across four distinct physical phases:
Acceleration Phase: Maximum electrical current is driven through the coil, creating an intense magnetic field against the permanent rare-earth magnets to accelerate the mass of the arm.
Coasting Phase: For long seeks across hundreds of cylinders, the arm reaches its maximum terminal velocity and coasts across the platter radius.
Deceleration Phase: Reverse current is applied through the voice coil, exerting braking force to bring the high-speed arm to a controlled stop over the target cylinder.
Head Settling Time: The heads vibrate slightly upon arrival. The closed-loop servo mechanism reads embedded magnetic servo bursts to dampen oscillations and settle the head within the target track boundary (a mechanical settling budget of 0.5 to 1.5 milliseconds).
Seek Classification
Typical Duration
Physical Description
Track-to-Track Seek
0.5 – 1.5 ms
Stepping between immediately adjacent cylinders (dominated entirely by settling time).
Full-Stroke Seek
15.0 – 20.0 ms
Traveling across the entire radius of the disk (from innermost cylinder to outermost cylinder).
Average Seek Time
4.0 – 9.0 ms
The expected seek time between two uniformly distributed random cylinders across the disk.
Mathematical Derivation: The 1⁄3 Disk Stroke Law
Suppose a disk has N cylinders numbered continuously from 0 to N. If target requests are uniformly and independently distributed across all cylinders, what is the average physical seek distance traveled between two consecutive random requests located at positions x and y?
The expected distance is given by the continuous double integral over the disk radius:
On average, a completely random seek travels one-third of the entire disk surface stroke! This statistical law allows operating system simulators to accurately estimate average random seek times as approximately one-third of the full-stroke seek duration.
Once the voice-coil arm settles precisely over the target cylinder, the read head cannot immediately begin reading data. The target sector may currently be on the opposite side of the rotating platter. The time required for the target sector to rotate underneath the read head is the Rotational Latency.
Because disk platters rotate at a strict Constant Angular Velocity (CAV) measured in Revolutions Per Minute (RPM), the period of one complete physical revolution (Trev) is constant:
Trev = ( 60⁄RPM ) × 1000 ms
Assuming random access, the target sector may arrive immediately beneath the head (best case: 0 ms), or it may have just passed the head by a fraction of a millimeter (worst case: one full physical revolution, Trev).
Under a uniform distribution, the Average Rotational Latency (Trot (avg)) is exactly half a revolution:
Trot (avg) = 1⁄2 × Trev = ( 30⁄RPM ) × 1000 ms
Spindle Speed (RPM)
Full Revolution Period
Average Rotational Latency
Target Market Segment
5,400 RPM
11.11 ms
5.56 ms
Consumer laptops, low-power NAS archives
7,200 RPM
8.33 ms
4.17 ms
Standard desktop storage, datacenter bulk arrays
10,000 RPM
6.00 ms
3.00 ms
Enterprise mission-critical database storage
15,000 RPM
4.00 ms
2.00 ms
High-performance SAS enterprise drives
3. Transfer Time (Ttransfer) & Controller Overhead
Once the head settles over the cylinder and the target sector rotates underneath, the drive enters the Transfer Phase.
Media Transfer Time: The time required for the sector's magnetic bits to sweep past the TMR sensor:
Ttransfer = Transfer Size (Bytes)⁄Internal Track Media Transfer Rate (Bytes/sec)
For a standard 4 KB (4,096 bytes) block read on an outer track streaming at 200 MB/s:
Controller Overhead (Tcontroller): The electronic setup time required for the controller's ASIC to decode commands, program DMA registers, verify ECC checksums, and trigger host interrupts (typically < 0.02 milliseconds).
The 500× Asymmetry: Random vs. Sequential Performance
We can now calculate the catastrophic performance penalty of random I/O versus sequential streaming on a modern 7,200 RPM mechanical drive:
Case 1: Random Access (4 KB Block)
Physical Seek & Rotation Paid on Every Block
Every 4 KB read accesses an arbitrary, disjoint cylinder:
Tseek ≈ 6.00 ms Trot ≈ 4.17 ms Ttransfer ≈ 0.02 ms Total Time (TI/O): ≈ 10.19 ms
Initial Seek + Rotation paid ONCE for the entire stream.
Subsequent blocks stream continuously as the track rotates.
Track skewing prevents rotational misses between tracks.
IOPS = Not seek-bound
Throughput = Wire Media Rate ≈ 200.00 MB/s!
The Core Architectural Lesson:
Sequential I/O is more than 500 times faster than random I/O on mechanical storage ($200\text{ MB/s}$ vs. $0.39\text{ MB/s}$).
This vast performance disparity explains why operating system kernels incorporate:
Read-Ahead (Prefetching): Detecting sequential reads and proactively loading dozens of subsequent sectors into the page cache ahead of user requests.
Write Buffering & Elevator Schedulers: Queueing writes in RAM to merge adjacent blocks and sort requests into sequential cylinder order before dispatching to physical hardware.
3. Disk Arm Scheduling Algorithms
In a multiprogramming operating system, dozens of processes issue concurrent reads and writes to storage. Because mechanical seek time and rotational delay dwarf electronic transfer speeds by over 500 to 1, the order in which pending disk requests are serviced directly dictates overall system throughput and interactive responsiveness.
When an application issues a file read, the operating system block layer enqueues the request into a kernel dispatch queue. The Disk Arm Scheduler (or I/O elevator) reorders, merges, and dispatches pending requests to optimize physical head trajectory.
Figure 2.3: Trajectory Comparison Across Classical Disk Scheduling Policies
Spatial head paths across cylinders 0 to 199 starting from cylinder 53 with pending queue [98, 183, 37, 122, 14, 124, 65, 67].
The Dual Mandate of the Disk Arm Scheduler
An effective disk scheduler must balance two fundamentally competing objectives:
Throughput Maximization: Squeezing the maximum number of megabytes per second out of the physical platters. This requires minimizing aggregate seek distance and reducing the frequency of head turnaround reversals:
Total Seek Cost = ∑i=1K | Cylinderi - Cylinderi-1 |
Fairness & Bounded Latency: Ensuring that no single I/O request starves in the queue indefinitely while the arm services requests closer to the active cylinder cluster.
Request Merging: Optimization Before Scheduling:
Before any arm movement algorithm evaluates pending requests, the operating system block layer executes Request Merging:
Back Merging: If a newly enqueued request addresses Sector 104, and an existing pending request addresses Sectors 100–103, the kernel merges them into a single contiguous request spanning Sectors 100–104.
Front Merging: Merging a new request directly ahead of an existing request on the identical track.
Merging eliminates physical seek operations entirely by converting multiple small random I/O operations into a single continuous streaming burst!
Detailed Algorithmic Analysis
1. First-Come, First-Served (FCFS)
The baseline scheduling policy services requests strictly in the chronological order of their arrival into the queue:
Advantages: Completely fair; zero starvation; trivial O(1) FIFO queue implementation.
The Defect — Wild Head Thrashing: FCFS pays zero attention to spatial locality. If Process A requests an inner cylinder (Cylinder 14) and Process B requests an outer cylinder (Cylinder 183), the arm thrashes back and forth across the entire platter width.
On our classical benchmark workload, FCFS generates 640 cylinders of head movement, operating at less than one-third the throughput of an elevator scheduler.
2. Shortest Seek Time First (SSTF)
SSTF applies a greedy heuristic: among all pending requests in the queue, it selects the request that requires the minimum physical seek distance from the current head position:
Performance: Slashes head travel from 640 cylinders down to 236 cylinders, dramatically increasing throughput under low-to-medium loads.
The Fatal Flaw — Pathological Starvation:
Because SSTF is greedy, it favors requests clustered near the current cylinder. If an application continuously generates requests around Cylinders 50–70, the head lingers in that cluster indefinitely.
A request pending on Cylinder 183 will starve forever as long as new requests arrive in the local neighborhood! For this reason, pure SSTF is never deployed in general-purpose production operating systems.
3. SCAN (The Elevator Algorithm)
To eliminate starvation while preserving spatial locality, the SCAN algorithm mimics a commercial building elevator:
The arm maintains a directional vector (e.g. Moving Outward toward Cylinder 199).
The head sweeps continuously in that direction, servicing all pending requests encountered along its path.
When the arm reaches the extreme cylinder of the disk (Cylinder 199), the arm reverses direction and begins sweeping inward toward Cylinder 0, servicing requests in reverse.
Starvation Bound: A request is guaranteed to be serviced in at most two full sweeps of the platter radius, permanently eliminating starvation.
The SCAN Defect — Non-Uniform Waiting Distribution:
SCAN suffers from an asymmetric waiting time distribution. When the arm passes Cylinder 50 heading right, the area directly behind it (Cylinders 0–49) has just been cleared of requests.
A new request arriving at Cylinder 48 must wait for the arm to travel all the way to 199, reverse, and sweep back down to 48—a wait of nearly two full disk strokes! In contrast, requests ahead of the advancing arm experience negligible wait times.
4. C-SCAN (Circular SCAN)
C-SCAN corrects the non-uniform wait distribution of SCAN by restricting servicing to a single sweep direction:
The arm sweeps in one direction only (e.g. from lowest cylinder toward highest cylinder), servicing requests along the way.
Upon reaching the outer extreme (Cylinder 199), the arm immediately performs a high-speed return jump back to Cylinder 0 without servicing any requests on the return journey!
Once reset to Cylinder 0, it resumes its forward sweep.
Mathematical Fairness: By treating the cylinders as a circular ring, C-SCAN provides a mathematically uniform average waiting time for all cylinders across the platter surface.
5. LOOK and C-LOOK (Industrial Optimizations)
Standard SCAN and C-SCAN waste significant mechanical travel by driving the arm all the way to the absolute physical edge of the disk (Cylinder 0 and Cylinder 199) even when no requests are pending at those extreme boundaries.
LOOK and C-LOOK add a forward-inspection lookahead:
The arm advances in its current direction only as far as the highest pending request in the queue.
In our benchmark workload, the highest pending request is Cylinder 183. LOOK reverses immediately at 183; it never wastes mechanical motion traveling to the unused Cylinder 199.
Similarly, C-LOOK executes its circular return jump immediately upon completing Cylinder 183, jumping directly to the lowest pending request (Cylinder 14) rather than Cylinder 0.
C-LOOK is the universal gold standard for rotational mechanical arm scheduling in production systems.
Modern Operating System Scheduling Architectures
In modern Linux and Windows kernels, disk scheduling has moved beyond pure geometric heuristics to address quality-of-service and hardware-offloaded queues:
1. The Linux Deadline Scheduler
Separates requests into multiple queues:
Sorted Elevator Queue: Standard C-LOOK ordering to maximize throughput.
Read FIFO Queue: Hard expiration deadline of 500 ms.
Write FIFO Queue: Relaxed expiration deadline of 5000 ms (5 s).
Why Prioritize Reads? Applications issuing reads typically block until data is returned. Writes are buffered asynchronously in the page cache. If a read request approaches its 500 ms deadline, the scheduler aborts elevator ordering and services the read immediately!
2. Native Command Queuing (NCQ)
Modern SATA and SAS drives implement hardware-side scheduling:
The host OS dispatches up to 32 commands simultaneously (or 256 in SCSI TCQ) into the drive controller's internal queue.
The on-drive microprocessor knows the exact real-time angular position of the spinning platters (which the host OS cannot know due to PCIe bus latency).
The drive controller executes Rotational Position Sorting (RPS), dynamically choosing the request that minimizes the sum of seek time plus immediate rotational delay!
Interactive Stepper: Disk Arm Scheduling Visualizer (0 – 199 Cylinders)
Scheduling PolicySSTF (Shortest Seek Time First): Always chooses the pending request closest to the current head cylinder. Minimizes seek distance greedily, but risks starving distant cylinders.
Current Head PositionCylinder 53
Target CylinderStart (53)
Seek Hop Distance0 Cylinders
Total Head Movement0 Cylinders
Pending Requests8 Remaining
Current Step SummaryInitial State: Disk head parked at Cylinder 53. Pending queue: [98, 183, 37, 122, 14, 124, 65, 67]. Ready to schedule.
What Is Happening
Head is parked at cylinder 53. The scheduler assesses the queue to pick the first target.
Why The System Does This
Baseline setup before mechanical arm acceleration begins.
Algorithm Analysis & Comparisons
Algorithm
Head Movement (Workload)
Core Behavioral Characteristic
Primary Defect / Limitation
FCFS
640 Cylinders
Completely fair, zero starvation.
Wild head thrashing; slowest throughput.
SSTF
236 Cylinders
Greedy local minimum; fast response under low loads.