1.2k views

Provide short answers to the following questions:

Disk requests come to disk driver for cylinders $10, 22, 20, 2, 40, 6$ and $38$, in that order at a time when the disk drive is reading from cylinder $20$. The seek time is $6$ msec per cylinder. Compute the total seek time if the disk arm scheduling algorithm is.

1. First come first served.
2. Closest cylinder next.
| 1.2k views

1. In FCFS sequence will be $\Rightarrow 20, 10, 22, 20, 2, 40, 6, 38$
total movement: $|20-10| + |10-22| + |22-20| + |20-2| + |2-40| + |40-6| + |6-38| = 146$
so total seek time $= 146 \times 6 = \mathbf{876 msec}$ 2. In Closest cylinder next sequence will be $\Rightarrow 20, 22, 10, 6, 2, 38, 40$
total movement: $|20-22| + |22-2| + |2-40| = 60$
so total seek time $= 60 \times 6 = \mathbf{360 msec}$ by Boss (11.5k points)
edited by
0
For FCFS

In last one |6-40| ?
0
sry thats typo..its |6-38|
0

0
What error?
0

@Arjun Sir

For better clarity it should be

Total head movements $= \:\mid 20-22\mid + \mid 22-10\mid + \mid 10-6 \mid + \mid 6 - 2 \mid + \mid 2-38 \mid + \mid 38-40 \mid$

$= 2 + 12 + 4 + 4 + 36 + 2 = 60$

So, total seek time $= 60 \times 6\:msec = 360\:msec$

A)FCFS:(20-10) + (22-10) + (22-2) + (40-2) + (40-6) + (38-6) = 146

But seek time is 6ms per cylinder,So total seek time = 146 * 6 = 876. B)Closest cylinder next:(22-20) + (22-10) + (10-6) + (6-2)  + (38-2) + (40-38) = 60

So total seek time = 60 * 6 = 360. by Boss (12.5k points)
edited
0

in FCFS 20 should be visited again after 22

in closest cylinder next 22 should be visited from 20

0
20 is not visited again because it is initially at 20.

closest cylinder next ..corrected.
+7
in FCFS it doesn't matter its initial position...he follows the sequence without knowing whether he will visit initial position again
so as per the sequence 20 will be visited again
0