Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE-IT-2004 | Question 62

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

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

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!