Java Reference
In-Depth Information
8.9 Using the specifications for the disk drive given in Exercise 8.8, calculate the
expected time to read one entire track, one sector, and one byte. Show your
calculations.
8.10 Using the disk drive specifications given in Exercise 8.8, calculate the time
required to read a 10MB file assuming
(a) The file is stored on a series of contiguous tracks, as few tracks as pos-
sible.
(b) The file is spread randomly across the disk in 8KB clusters.
Show your calculations.
8.11 At the end of 2004, the fastest disk drive I could find specifications for was
the Maxtor Atlas. This drive had a nominal capacity of 73.4GB using 4 plat-
ters (8 surfaces) or 9.175GB/surface. Assume there are 16,384 tracks with an
average of 1170 sectors/track and 512 bytes/sector. 4 The disk turns at 15,000
rpm. The track-to-track seek time is 0.4 ms and the average seek time is 3.6
ms. How long will it take on average to read a 6MB file, assuming that the
first track of the file is randomly placed on the disk, that the entire file lies on
contiguous tracks, and that the file completely fills each track on which it is
found. Show your calculations.
8.12 Using the specifications for the disk drive given in Exercise 8.11, calculate
the expected time to read one entire track, one sector, and one byte. Show
your calculations.
8.13 Using the disk drive specifications given in Exercise 8.11, calculate the time
required to read a 10MB file assuming
(a) The file is stored on a series of contiguous tracks, as few tracks as pos-
sible.
(b) The file is spread randomly across the disk in 8KB clusters.
Show your calculations.
8.14 Prove that two tracks selected at random from a disk are separated on average
by one third the number of tracks on the disk.
8.15 Assume that a file contains one million records sorted by key value. A query
to the file returns a single record containing the requested key value. Files
are stored on disk in sectors each containing 100 records. Assume that the
average time to read a sector selected at random is 10.0 ms. In contrast, it
takes only 2.0 ms to read the sector adjacent to the current position of the I/O
head. The “batch” algorithm for processing queries is to first sort the queries
by order of appearance in the file, and then read the entire file sequentially,
processing all queries in sequential order as the file is read. This algorithm
implies that the queries must all be available before processing begins. The
“interactive” algorithm is to process each query in order of its arrival, search-
ing for the requested sector each time (unless by chance two queries in a row
4 Again, this track layout does does not account for the zoned arrangement on modern disk drives.
Search WWH ::




Custom Search