In: Computer Science
Consider a hard disk with the following specifications:
Compute the following:
Which of the following is true about the above computation?
A. The average time to read a track is approximately 35ms
B. The average time to read a track is approximately 25ms
C. The average time to read a track is approximately 26.7ms [ I already no this is not the correct answer. This was answer was marked wrong on my assignment.]
D. The average time to read a track is approximately 45ms
A disk consists of platters. Both side of a platter can contain memory. A platter is divided into tracks. Tracks are concentric circles. A particular track of all the platters in the disk forms a cylinder. So, number of cylinders in a disk gives the number of tracks in a platter. Tracks are divided into sectors. A block consists of one or more sectors. Blocks are the fundamental unit of memory transfer operation of a disk. Means memories are read or written in the disk in multiple of blocks.
We have the below information about the disk-
Diameter = 3.5 inch
Rotation rate = 3600 Rotations Per Minute
Platters = 20, and 2 surfaces per platter
Capacity = 40 GB
Number of cylinders = 1024
1 block = 4 KB
Now we calculate how much memory a single track contains. Let it be N KB.
N KB/track * 1024 tracks/platter * 20 platters/disk * 2 sides/platter = total memory = 40 GB
So, N = (40 * 1024 * 1024)/(1024*20*2) = 102.4
So, one track contains 102.4 KB memory.
Average time to access a block?
Average time to access a block = Average seek time + Average rotational delay
Average seek time is the time to place the read/write head to the desired track. This is given to be 10 ms.
Average rotational delay is the time required for the rotation after which the read/write head will point to the start of the desired block.
This Average rotational delay is taken to be the half of time taken for a full rotation.
For 3600 rotations the disk takes (1*60*1000) ms
For 1 rotation the disk takes (1*60*1000)/360 ms = 16.67 ms
So, Average rotational delay = 16.67/2 ms = 8.33 ms.
Putting these values in the formula we get
Average time to access a block = 10 ms + 8.33 ms = 18.33 ms. (Answer)
Average time to read four adjacent blocks?
Average time to read four adjacent blocks = Average seek time + Average rotational delay + Time required to read the blocks.
The four blocks are separated by 3 overhead gaps which is 20 % of the blocks. Each block is of 4 KB
Total amount of memory required to read four blocks = (4*4) KB + (3 * 4 * 20/100) KB = 18.4 KB
To read a complete track (102.4 KB) it requires one full rotation = 16.67 ms
To read 18.4 KB time required = (16.67 *18.4)/102.4 ms = 2.99 ms
Average time to read four adjacent blocks = (10 + 8.33 + 2.99) ms = 21.32 ms. (Answer)
The average time to read one full track?
Average time to read a full track = Average seek time + Average rotational delay + Time required to read a full track.
Time required to read a full track is equal to time required for one full rotation.
Average time to read a full track = (10 + 8.33 + 16.67) ms = 35 ms. (Answer)
Option A is the correct answer. You forgot to add the average rotational delay in your answer. That’s the reason your answer came option C.
For any further doubts let me know through comments. Please upvote if the discussion solved your query.