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.

Sec. 8.6 Further Reading 295• Use as much working memory as possible. Applying more memory usuallyspeeds processing. In fact, more memory will have a gre<strong>at</strong>er effect than afaster disk. A faster CPU is unlikely to yield much improvement in runningtime for external sorting, because disk I/O speed is the limiting factor.• If possible, use additional disk drives for more overlapping of processingwith I/O, <strong>and</strong> to allow for sequential file processing.8.6 Further ReadingA good general text on file processing is Folk <strong>and</strong> Zoellick’s File <strong>Structures</strong>: AConceptual Toolkit [FZ98]. A somewh<strong>at</strong> more advanced discussion on key issues infile processing is Betty Salzberg’s File <strong>Structures</strong>: An Analytical Approach [Sal88].A gre<strong>at</strong> discussion on external sorting methods can be found in Salzberg’s book.The present<strong>at</strong>ion in this chapter is similar in spirit to Salzberg’s.For details on disk drive modeling <strong>and</strong> measurement, see the article by Ruemmler<strong>and</strong> Wilkes, “An Introduction to Disk Drive Modeling” [RW94]. See AndrewS. Tanenbaum’s Structured <strong>Computer</strong> Organiz<strong>at</strong>ion [Tan06] for an introduction tocomputer hardware <strong>and</strong> organiz<strong>at</strong>ion. An excellent, detailed description of memory<strong>and</strong> hard disk drives can be found online <strong>at</strong> “The PC Guide,” by Charles M.Kozierok [Koz05] (www.pcguide.com). The PC Guide also gives detailed descriptionsof the Microsoft Windows <strong>and</strong> UNIX (Linux) file systems.See “Outperforming LRU with an Adaptive Replacement Cache <strong>Algorithm</strong>”by Megiddo <strong>and</strong> Modha [MM04] for an example of a more sophistic<strong>at</strong>ed algorithmthan LRU for managing buffer pools.The snowplow argument comes from Donald E. Knuth’s Sorting <strong>and</strong> Searching[Knu98], which also contains a wide variety of external sorting algorithms.8.7 Exercises8.1 <strong>Computer</strong> memory <strong>and</strong> storage prices change rapidly. Find out wh<strong>at</strong> thecurrent prices are for the media listed in Figure 8.1. Does your inform<strong>at</strong>ionchange any of the basic conclusions regarding disk processing?8.2 Assume a disk drive from the l<strong>at</strong>e 1990s is configured as follows. The totalstorage is approxim<strong>at</strong>ely 675MB divided among 15 surfaces. Each surfacehas 612 tracks; there are 144 sectors/track, 512 bytes/sector, <strong>and</strong> 8 sectors/cluster.The disk turns <strong>at</strong> 3600 rpm. The track-to-track seek time is20 ms, <strong>and</strong> the average seek time is 80 ms. Now assume th<strong>at</strong> there is a360KB file on the disk. On average, how long does it take to read all of thed<strong>at</strong>a in the file? Assume th<strong>at</strong> the first track of the file is r<strong>and</strong>omly placed onthe disk, th<strong>at</strong> the entire file lies on adjacent tracks, <strong>and</strong> th<strong>at</strong> the file completelyfills each track on which it is found. A seek must be performed each time theI/O head moves to a new track. Show your calcul<strong>at</strong>ions.

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

Saved successfully!

Ooh no, something went wrong!