Java Reference
In-Depth Information
Intersector Gap
Sector
Header
Sector
Sector
Header
Sector
Data
Data
Intrasector Gap
Figure8.4 An illustration of sector gaps within a track. Each sector begins with
a sector header containing the sector address and an error detection code for the
contents of that sector. The sector header is followed by a small intra-sector gap,
followed in turn by the sector data. Each sector is separated from the next sector
by a larger inter-sector gap.
8.2.2
Disk Access Costs
When a seek is required, it is usually the primary cost when accessing information
on disk. This assumes of course that a seek is necessary. When reading a file in
sequential order (if the sectors comprising the file are contiguous on disk), little
seeking is necessary. However, when accessing a random disk sector, seek time
becomes the dominant cost for the data access. While the actual seek time is highly
variable, depending on the distance between the track where the I/O head currently
is and the track where the head is moving to, we will consider only two numbers.
One is the track-to-track cost, or the minimum time necessary to move from a
track to an adjacent track. This is appropriate when you want to analyze access
times for files that are well placed on the disk. The second number is the average
seek time for a random access. These two numbers are often provided by disk
manufacturers. A typical example is the Western Digital Caviar serial ATA drive.
The manufacturer's specifications indicate that the track-to-track time is 2.0 ms and
the average seek time is 9.0 ms. In 2008 a typical drive in this line might be 120GB
in size. In 2011, that same line of drives had sizes of up to 2 or 3TB. In both years,
the advertised track-to-track and average seek times were identical.
For many years, typical rotation speed for disk drives was 3600 rpm, or one
rotation every 16.7 ms. Most disk drives in 2011 had a rotation speed of 7200 rpm,
or 8.3 ms per rotation. When reading a sector at random, you can expect that the
disk will need to rotate halfway around to bring the desired sector under the I/O
head, or 4.2 ms for a 7200-rpm disk drive.
Once under the I/O head, a sector of data can be transferred as fast as that
sector rotates under the head. If an entire track is to be read, then it will require one
rotation (8.3 ms at 7200 rpm) to move the full track under the head. If only part of
the track is to be read, then proportionately less time will be required. For example,
if there are 16,000 sectors on the track and one sector is to be read, this will require
a trivial amount of time (1/16,000 of a rotation).
Example8.1 Assume that an older disk drive has a total (nominal) ca-
pacity of 16.8GB spread among 10 platters, yielding 1.68GB/platter. Each
Search WWH ::




Custom Search