13.07.2015 Views

13.1 through 13.5, 13.10 and 13.11

13.1 through 13.5, 13.10 and 13.11

13.1 through 13.5, 13.10 and 13.11

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

472 Chapter 13 Disk Storage, Basic File Structures, <strong>and</strong> HashingA disk controller, typically embedded in the disk drive, controls the disk drive anclinterfaces it to the computer system. One of the st<strong>and</strong>ard interfaces used today fbrdisk drives on PCs <strong>and</strong> workstations is called SCSI (Small Computer StoragcInterface). The controller accepts high-level I/O comm<strong>and</strong>s <strong>and</strong> takes appropriatcaction to position the arm <strong>and</strong> causes the read/write action to take place. To transfera disk block, given its address, the disk cor.rtroller must first mechanically positionthe read/write head on the correct track. The time required to do this is called thcseektime. Typical seek times are 7 to l0 msec on desktops <strong>and</strong> 3 to 8 msecs onservers. Following that, there is another delay-called the rotational delay orlatenry-while the beginning of the desired block rotates into position under thcread/write head. It depends on the rprn of the disk. For example, at 15,000 rpm, thctime per rotation is 4 msec <strong>and</strong> the average rotational delay is the time per half rer -olution, or 2 msec. Finally, some additional time is needed to transfer the data; thisis called the block transfer time. Hence, the total time needed to locate <strong>and</strong> transferan arbitrary block, given its address, is the sun-r of the seek time, rotational delar.<strong>and</strong> block transfer time. The seek tin.re <strong>and</strong> rotational delay are usually much largcrthan the block transfer time. To make the trar.rsf'er of rnultiple blocks more efficient.it is common to transfer several consecutive blocks on the same track or cylinder.This eiiminates the seek time <strong>and</strong> rotational delay for all but the first block ar-rd canresult in a substantial saving of time when numerous contiguous blocks are transferred. Usually, the disk rnanufacturer provides a bulk transfer rate for calculatinsthe time required to transfer consecutive blocks. Appendix B contains a discussionof these <strong>and</strong> other disk parameters.The time needed to locate <strong>and</strong> trar-rsfer a disk block is in the order of miliiseconcls.usually ranging from 9 to 60 msec. For contiguous blocks, locating the first blocktakes from 9 to 60 msec, but transf'erring subsequent blocks may take only 0.4 to imsec each. Many search techniques take advantage of consecutive retrieval of block:when searching fbr data on disk. In any case, a transfer time in the order of rnillisecondsis considered quite high compared with the time required to process data inmain memory by current CPUs. Hence, locating data on disk is a nnjor bottleneck indatabase applications. The file structures we discuss here <strong>and</strong> in Chapter 14 attemptto ninimize the number of block transJ'ers needed to locate <strong>and</strong> transfer the requirecldata from disk to main memorv.13.2.2 Magnetic Tape Storage DevicesDisks are r<strong>and</strong>om access secondary storage devices because ar-r arbitrary disk blockmay be accessed at r<strong>and</strong>oru once we specifr its address. Magnetic tapes are sequen -tial access devices; to access the rrth block on tape, first we must scan the precedinun - I blocks. Data is stored on reels of high-capacity rnagnetic tape, somewhat sinrilarto audiotapes or videotapes. A tape drive is required to read the data from orwrite the data to a tape reel. Usually, each group of bits that forms a byte is storcrlacross the tape, <strong>and</strong> the bytes themselves are stored consecutively on the tape.A readhvrite head is used to read or write data on tape. Data records on tape are alsostored in blocks-although the biocks may be substantially larger than those fbr

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

Saved successfully!

Ooh no, something went wrong!