So let's talk about magnetic disks, which today usually means a hard disk, or a
hard drive. But the so-called floppy disks are
also magnetic disks, and work very much along
the same lines. It's just that today we
mostly have hard drives, and few people even
remember floppy drives. A magnetic disk has a
spindle to which we can attach so-called platters.
All of the platters are attached to the
same spindle and rotate at the same speed,
let's say in this direction. There is a
motor here that really drives the spindle to rotate
and that causes all the platters to rotate at the same speed. If we look at the
single platter it has a surface covered with
magnetic material on one side and also on another.
So this drive that has three platters
usually will have total of six surfaces. The
data bits are on all the surfaces. We access this data by having a magnetic head
attached to an arm and another one for the lower surface. And then all of these
heads are attached to a head assembly which can move all the heads in unison.
So if this head is here, this head
will be in the same position on another platter,
and so on. We don't individually move the heads,
we move them all at the same time. So
because the platter is rotating and the head
is staying in place usually, the head will be
able to access this circle on the surface of
the disk. Each head will be able to access
the circle on its own surface, and all of these are going to be at the same
distance from the spindle. This is called a track. All of the tracks
at the same distance from the spindle
form what is called a cylinder. The cylinder
simply consists of one track from each
surface where the tracks in the cylinders are
those that can be accessed by different heads
at the same time. So for example here,
there are six heads. When they stay in
this position and all the platters rotate, they're able
to access the six racks of that cylinder.
The way we access different tracks on the
disk is by moving the head so that
it comes closer or gets further from the spindle.
And that way we can access the entire
area of each surface. So the data, naturally, will
be organized into bits that are positioned along
the track, and then another track will have different
bits and so on. If you look at the surface from above, and this is now the
spindle, this is would be one track and
this would be another. And finally on one track
we don't store data continuously through the track
because usually a lot of bits are on
a single track, instead the data along one
track is divided into sectors. And a sector
will be the smallest unit that we can actually read. Now if the disk rotates in
this direction, and the head is currently here,
as the disk rotates, different bits of the sector
are going to be under the head. So the
sector will have some preamble here that is
a recognizable bit pattern that tells the head
that this is the beginning of a sector.
Then we have the appropriate number of the
bits for the sector that actually hold the
data, followed usually by some checksum and other
information that is needed to possibly correct errors
in the sector. And then another sector would just
have the same things and so on. So when
the head assembly moves to a particular cylinder, then
the heads start listening for the beginning of the sector.
Once they see the beginning of the sector and
see which sector it is, they know where they
are in the whole track. So the disk capacity
can be computed as the number of platters times 2.
This will really be the number of surfaces times how many tracks we have per
surface. Or expressed in another way how many
cylinders do we have on these disks times
how many sectors do we have per track times how many bytes of data do we
have in each sector. Usually we have a small number of platters, such as one,
two, three, maybe four. We have thousands
of tracks per surface, tens to hundreds sectors
per track, and something like a kilobyte or
maybe a half of kilobyte of bytes per
sector. So sectors are usually like kilobytish
in size. We have about 100, let's say,
sectors per track, maybe a little bit more,
and we have thousands of tracks per surface.
Obviously, the whole thing needs to be very thin
so these platters are really close to each other.
It needs to be, let's say, two and a
half inches wide total, including the head assembly and
so on. So the platters are only a couple
of inches in diameter and because we have so
many tracks per surface that means that the tracks
are spaced very, very close to each other and
the head assembly needs to be very, very precise in how it positions heads.