in Operating System edited by
7,487 views
4 votes
4 votes

Consider the disk system with 100 cylinders. The request to access the cylinders occur in the following sequence.

4, 37, 10,7,19,73,2,15,6,20

Assuming the head is currently at cylinder 50 what is the time taken to satisfy all requests if it takes 1 ms to move from one cylinder to adjacent one and shortest seek ime first algorithm is used.

  1. 95 ms
  2. 119 ms
  3. 233 ms
  4. 276 ms
in Operating System edited by
by
7.5k views

2 Answers

10 votes
10 votes
Best answer
As shortest seek time algorithm is used and the head starts from cylinder 50, the order followed is :

$50\rightarrow 37\rightarrow 20\rightarrow 19\rightarrow 15\rightarrow 10\rightarrow 7\rightarrow 6\rightarrow 4\rightarrow 2\rightarrow 73$

So, as it takes 1 ms to move to adjacent cylinder, the time taken is:

13+17+1+4+5+3+1+2+2+71 =119 ms

Hence option (B) is right answer.
selected by

2 Comments

no need to calculate  all numbers  

50-2+73-2=119

because 50 to 2 same direction so we can minimize it 50-2
2
2

if it takes 1 ms to move from one cylinder to adjacent one

what does it mean ? if this condition is not given then ?

0
0
0 votes
0 votes

The given sequence is
4, 34, 10,7, 19, 73, 2, 15, 6, 20
Arrange the sequence in order
2, 4, 6, 10, 15, 19, 20, 34, 73
 ⇒ 1 ms to move from one cylinder to adjacent one
⇒ (16*1)+(14*1)+(1*1)+(4*1)+(5*1)+(3*1)+(1*1)+(2*1)+(2*1)+(71*1)
⇒ 16+14+1+4+5+3+1+2+2+71
⇒ 119 ms

Answer:

Related questions