Skip to content
Related Articles

Related Articles

GATE | GATE-IT-2004 | Question 62

View Discussion
Improve Article
Save Article
  • Last Updated : 07 Dec, 2021

A disk has 200 tracks (numbered 0 through 199). At a given time, it was servicing the request of reading data from track 120, and at the previous request, service was for track 90. The pending requests (in order of their arrival) are for track numbers.

30 70 115 130 110 80 20 25.

How many times will the head change its direction for the disk scheduling policies SSTF(Shortest Seek Time First) and FCFS (First Come First Serve)
(A) 2 and 3
(B) 3 and 3
(C) 3 and 4
(D) 4 and 4


Answer: (C)

Explanation:  

According to Shortest Seek Time First:

90-> 120-> 115-> 110-> 130-> 80-> 70-> 30-> 25-> 20

Change of direction(Total 3);  120->15; 110->130; 130->80

According to First Come First Serve:

90-> 120-> 30-> 70-> 115-> 130-> 110-> 80-> 20-> 25

Change of direction(Total 4);  120->30; 30->70; 130->110;20->25

Therefore,Answer is C

 

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!