Consider a hard disk with a rotational speed of 15000 rpm. The time to move the
read/write head from a track to its adjacent track is 1 millisecond. Initially, the head
is on track 0. The number of sectors per track is 400. The sector size is 1024 bytes.
It is necessary to transfer data from 10 randomly located sectors in each of the
following tracks in the order: 5, 12 and 7.
The total time for the data transfer (in milliseconds) from the hard disk is _________.
(rounded off to one decimal place)
Let us look at this problem by splitting the total disk activity into two separate categories: head movement (seek) and data access (rotational delay plus read).
Category 1: Head movement across tracks
The head visits track 5, then track 12, then track 7, starting from track 0. Since crossing one track boundary costs 1 ms, the movement cost is just the sum of absolute track differences along the path:
\(0 \to 5\) costs \(5\) ms, \(5 \to 12\) costs \(7\) ms, \(12 \to 7\) costs \(5\) ms.
Total seek cost \(= 5 + 7 + 5 = 17\) ms.
Category 2: Reading 10 scattered sectors from a track
First find the disk's rotation period. At 15000 rpm, the disk completes \(15000/60 = 250\) turns every second, so one turn takes:
\(T = \frac{60000}{15000} = 4\) ms
A track holds 400 sectors, so a single sector occupies a \(1/400\) fraction of the rotation, giving a per-sector read (transfer) time of \(4/400 = 0.01\) ms.
Since the 10 sectors required on a track are scattered randomly rather than lying next to each other, there is no way to line them up under the head efficiently one after another; each of the 10 accesses independently incurs the standard average rotational delay of half a revolution before the wanted sector shows up:
average wait per sector \(= 4/2 = 2\) ms
So each sector access costs \(2 + 0.01 = 2.01\) ms (wait plus read), and 10 such accesses on one track cost:
\(10 \times 2.01 = 20.1\) ms
Since this pattern of 10 random sector reads repeats identically on all 3 requested tracks (5, 12, 7), the data-access cost totals:
\(3 \times 20.1 = 60.3\) ms
Combining both categories
Total time \(= 17\text{ (seek)} + 60.3\text{ (data access)} = 77.3\) ms
This matches the required answer of \(77.3\) ms.