11.07.2015 Views

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

Data Structures and Algorithm Analysis - Computer Science at ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

296 Chap. 8 File Processing <strong>and</strong> External Sorting8.3 Using the specific<strong>at</strong>ions for the disk drive given in Exercise 8.2, calcul<strong>at</strong>e theexpected time to read one entire track, one sector, <strong>and</strong> one byte. Show yourcalcul<strong>at</strong>ions.8.4 Using the disk drive specific<strong>at</strong>ions given in Exercise 8.2, calcul<strong>at</strong>e the timerequired to read a 10MB file assuming(a) The file is stored on a series of contiguous tracks, as few tracks as possible.(b) The file is spread r<strong>and</strong>omly across the disk in 4KB clusters.Show your calcul<strong>at</strong>ions.8.5 Assume th<strong>at</strong> a disk drive is configured as follows. The total storage is approxim<strong>at</strong>ely1033MB divided among 15 surfaces. Each surface has 2100tracks, there are 64 sectors/track, 512 bytes/sector, <strong>and</strong> 8 sectors/cluster. Thedisk turns <strong>at</strong> 7200 rpm. The track-to-track seek time is 3 ms, <strong>and</strong> the averageseek time is 20 ms. Now assume th<strong>at</strong> there is a 512KB file on the disk. Onaverage, how long does it take to read all of the d<strong>at</strong>a on the file? Assume th<strong>at</strong>the first track of the file is r<strong>and</strong>omly placed on the disk, th<strong>at</strong> the entire file lieson contiguous tracks, <strong>and</strong> th<strong>at</strong> the file completely fills each track on which itis found. Show your calcul<strong>at</strong>ions.8.6 Using the specific<strong>at</strong>ions for the disk drive given in Exercise 8.5, calcul<strong>at</strong>e theexpected time to read one entire track, one sector, <strong>and</strong> one byte. Show yourcalcul<strong>at</strong>ions.8.7 Using the disk drive specific<strong>at</strong>ions given in Exercise 8.5, calcul<strong>at</strong>e the timerequired to read a 10MB file assuming(a) The file is stored on a series of contiguous tracks, as few tracks as possible.(b) The file is spread r<strong>and</strong>omly across the disk in 4KB clusters.Show your calcul<strong>at</strong>ions.8.8 A typical disk drive from 2004 has the following specific<strong>at</strong>ions. 3 The totalstorage is approxim<strong>at</strong>ely 120GB on 6 pl<strong>at</strong>ter surfaces or 20GB/pl<strong>at</strong>ter. Eachpl<strong>at</strong>ter has 16K tracks with 2560 sectors/track (a sector holds 512 bytes) <strong>and</strong>16 sectors/cluster. The disk turns <strong>at</strong> 7200 rpm. The track-to-track seek timeis 2.0 ms, <strong>and</strong> the average seek time is 10.0 ms. Now assume th<strong>at</strong> there is a6MB file on the disk. On average, how long does it take to read all of the d<strong>at</strong>aon the file? Assume th<strong>at</strong> the first track of the file is r<strong>and</strong>omly placed on thedisk, th<strong>at</strong> the entire file lies on contiguous tracks, <strong>and</strong> th<strong>at</strong> the file completelyfills each track on which it is found. Show your calcul<strong>at</strong>ions.3 To make the exercise doable, this specific<strong>at</strong>ion is completely fictitious with respect to the track<strong>and</strong> sector layout. While sectors do have 512 bytes, <strong>and</strong> while the number of pl<strong>at</strong>ters <strong>and</strong> amount ofd<strong>at</strong>a per track is plausible, the reality is th<strong>at</strong> all modern drives use a zoned organiz<strong>at</strong>ion to keep thed<strong>at</strong>a density from inside to outside of the disk reasonably high. The rest of the numbers are typicalfor a drive from 2004.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!