In last one |6-40| ?

19 votes

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.

- First come first served.
- Closest cylinder next.

25 votes

Best answer

- 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}$

- In
**Closest cylinder next**

total movement: $|20-22| + |22-2| + |2-40| = 60$

so total seek time $= 60 \times 6 = \mathbf{360 msec}$

3

@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$

11 votes

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.**