in Operating System edited by
5,944 views
31 votes
31 votes

The head of a hard disk serves requests following the shortest seek time first $\textsf{(SSTF)}$ policy. The head is initially positioned at track number $180$.

Which of the request sets will cause the head to change its direction after servicing every request assuming that the head does not change direction if there is a tie in $\textsf{SSTF}$ and all the requests arrive before the servicing starts?

  1. $11, 139, 170, 178, 181, 184, 201, 265$
  2. $10, 138, 170, 178, 181, 185, 201, 265$
  3. $10, 139, 169, 178, 181, 184, 201, 265$
  4. $10, 138, 170, 178, 181, 185, 200, 265$
in Operating System edited by
5.9k views

3 Comments

reshown by
unable to understand the que???

what is actually doing in this que???? plz explain in simple way
0
0
read question once again..here after "every" request means after "each" request.
6
6
truck number 180 :P
admins please edit for this truck :P
3
3

1 Answer

31 votes
31 votes
Best answer

It should be (B).

When the head starts from $180$. It seeks the nearest track which is $181$. Then, from $181$ it seeks the nearest one which is $178$ and $184$. But the difference in both from $181$ is same and as given in the question. If there is a tie then the head wont change its direction, and therefore to change the direction we need to consider $178$. and thus we can eliminate option (A) and (C).



Coming next to option (B) and (D).

Following the above procedure you'll see that option (D) is eliminated on similar ground. And thus you can say option (B) is correct.

edited by

4 Comments

going by the options is the only choice here, right?
0
0
yes @Abhineet
0
0
Option A and C eliminates is clear but opt B and D are similar directed sequences. And in the picture of option D why is it going 178 to185 instead of 178 to 170
0
0
Answer:

Related questions