• edited by
11,053 views
43 43 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$

2 Answers

Best answer
38 38 votes

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
Answer:
Position:
Show:

Related questions

139 139 votes
18 answers 18 answers
43.0k
43.0k views
Ishrat Jahan asked Oct 30, 2014
42,950 views
The head of a hard disk serves requests following the shortest seek time first (SSTF) policy. What is the maximum cardinality of the request set, so that the head changes...
98 98 votes
6 answers 6 answers
38.2k
38.2k views
Ishrat Jahan asked Oct 30, 2014
38,235 views
A demand paging system takes $100$ time units to service a page fault and $300$ time units to replace a dirty page. Memory access time is $1$ time unit. The probability o...
50 50 votes
6 answers 6 answers
17.5k
17.5k views
Ishrat Jahan asked Oct 30, 2014
17,461 views
Synchronization in the classical readers and writers problem can be achieved through use of semaphores. In the following incomplete code for readers-writers problem, two ...
94 94 votes
7 answers 7 answers
36.2k
36.2k views
Ishrat Jahan asked Oct 29, 2014
36,162 views
A hard disk system has the following parameters :Number of tracks $= 500$Number of sectors/track $= 100$Number of bytes /sector $= 500$Time taken by the head to move from...