Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

***Ex: 9.5 Consider a disk with a sector size of 512 bytes, 2000 tracks per surf

ID: 3771809 • Letter: #

Question

***Ex: 9.5 Consider a disk with a sector size of 512 bytes, 2000 tracks per surface, 50 sectors per track, five double-sided platters, and average seek time of 10 msec.

Question: Consider again the disk specifications from Ex. 9.5 (see above), and suppose that a block size of 1024 bytes is chosen. Suppose that a file containing 100,000 records of 100 bytes each is to be stored on such a disk and that no record is allowed to span two blocks.

a) How many records fit onto a block?

b) How many blocks are required to store the entire file? If the file is arranged sequentially on the disk, how many surfaces are needed?

c) How many records of 100 bytes each can be stored using this disk?

d) If pages are stored sequentially on disk, with page 1 on block 1 of track 1, what page is stored on block 1 of track 1 on the next disk surface? How would your answer change if the disk were capable of reading and writing from all heads in parallel?

e) What time is required to read a file containing 100,000 records of 100 bytes each sequentially? Again, how would your answer change if the disk were capable of reading/writing from all heads in parallel (and the data was arranged optimally)?

f) What is the time required to read a file containing 100,000 records of 100 bytes each in a random order? To read a record, the block containing the record has to be fetched from disk. Assume that each block request incurs the average seek time and rotational delay.

Explanation / Answer

a) 2048/100 = 20. We can have at most 20 records in a block.


b) (1,000,000/20)=50,000 blocks are required to store the entire file. A track has 25 blocks, a cylinder has 25*10=250 blocks. Therefore, we need 50,000/250=200 .cylinders to store the file sequentially.


c) The disk has 1000 cylinders with 250 blocks each, i.e. it has 250,000 blocks. A block contains 20 records. Thus, the disk can store 5,000,000 records.


d)There are 25 blocks in each track. It is block 26 on block 1 of track 1 on the next disk surface.


e)We need to read 200 cylinders. In order to read one cylinder, we have 1 seek, no rotational
delays and the transfer of 250 blocks = 500KB . Therefore, the time to read one cylinder is 5msec + 500K/100M sec = 5msec + 5 msec = 10 msec. The time to read the entire file is 200*10msec =2sec


f) In random access, the read of every block requires an average seek time of 5 msec, an average rotational delay of 5 msec and a transfer time of 2K/100M sec = 0.02 msec, i.e. 10.02 msec. Therefore, the time to read the entire file is 50,000*10.02msec ~ 500sec.