Sector interleaving was once used on
older hard disks to ensure that the sectors were efficiently spaced on the track. This was
needed to ensure that sector #2 didn't rotate past the head while sector #1 was being
processed. The high-speed disk controllers on modern drives are now fast enough that they
no longer are a performance-limiting factor in how the sectors on the disk are arranged.
However, there are other delay issues within the drive that require spacing to be
optimized in even the fastest drives, to maximize performance. And unlike the interleaving
situation, these delays are caused by electromechanical concerns and are therefore likely
to be with us for as long as hard drives use their current general design.
The first issue is the delay in time incurred when switching between cylinders on the
hard disk, called appropriately enough, cylinder switch time. Let's imagine
that we "lined up" all of the tracks on a platter so that the first sector on
each track started at the same position on the disk. Now let's say that we want to read
the entire contents of two consecutive tracks, a fairly common thing to need to do. We
read all the sectors of track #1 (in sequence, since we can use a 1:1 interleave) and then
switch to track #2 to start reading it at its first sector.
The problem here is that it takes time to physically move the heads (or more actually, the actuator assembly) to track #2. In fact, it often takes a
millisecond or more. Let's consider a modern 10,000 RPM drive. The IBM Ultrastar 72ZX has
a specification of only 0.6 milliseconds for seeking from one track to an adjacent one.
That's actually quite fast by today's standards. But consider that in that amount of time,
a 10,000 RPM drive will perform approximately 10% of a complete revolution of the
platters! If sector #1 on track #2 is lined up with sector #1 on track #1, it will be long
gone by the time we switch from track #1 to track #2. We'd have to wait for the remaining
90% of a revolution of the platters to do the next read, a big performance penalty. This
problem isn't as bad as the interleave one was, because it occurs only when changing
tracks, and not every sector. But it's still bad, and it's avoidable.
The issue is avoided by offsetting the start sector of adjacent tracks to minimize the
likely wait time (rotational latency) when
switching tracks. This is called cylinder skew. Let's say that in the particular
zone where tracks #1 and #2 are, there are 450 sectors per track. If 10% of the disk spins
by on a track-to-track seek, 45 sectors go past. Allowing some room for error and
controller overhead, perhaps the design engineers would shift each track so that sector #1
of track #2 was adjacent to sector #51 of track #1. Similarly, sector #1 of track #3 would
be adjacent to sector #51 of track #2 (and hence, adjacent to sector #101 of track #1).
And so on. By doing this, we can read multiple adjacent tracks virtually seamlessly, and
with no performance hit due to unnecessary platter rotations.
The same problem, only to a lesser degree, occurs when we change heads within a
cylinder. Here there is no physical movement, but it still takes time for the switch to be made from
reading one head to reading another, so it makes sense to offset the start sector of
tracks within the same cylinder so that after reading from the first head/track in the
cylinder, we can switch to the next one without losing our "pace". This is
called head skew. Since switching heads takes much less time than switching
cylinders, head skew usually means a smaller number of sectors being offset than cylinder
skew does.
|
|
These two diagrams illustrate the concept of cylinder
and head skew. Assume that these platters spin
counter-clockwise (as seen from your vantage point) and that they are adjacent to each
other (they might
be the two surfaces of the same platter.) They each have a cylinder skew of three,
meaning that adjacent
tracks are offset by three sectors. In addition, the platter on the right has a head skew
of one relative
to the one on the left. (Of course, real drives have thousands of tracks with hundreds of
sectors each.) |
Both cylinder and head skew must be simultaneously "overlaid" onto all the
tracks of the hard disk, resulting in a "two-dimensional pattern" of sorts, with
different offsets being applied depending on the specific timing characteristics of the
disk. The layout of the tracks is adjusted to account for cylinder skew and head skew,
based on the way the designers intend the hard disk to store sequential data. All of the
details are taken care of by the controller. This is one reason why having integrated,
dedicated drive electronics on the disk itself, is such a good idea. No universal,
external controller could possibly know how to take all these hard disk characteristics
and performance requirements into account.
Next: Sector Format and Structure