1 1 vote The head of a moving head disk with $100$ tracks numbered $0$ to $99$ is serving a request at track $x$. if the requests of track $25, 76, 43, 10, 67$ are served using $FIFO$ algorithm, then total head movements are $194$. The track $x$ initially served was at ________. GATE tbb-mockgate-1 numerical-answers disk-scheduling operating-system + – Bikram 2.6k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 7 7 votes @ Bikram Sir I have a doubt in this. As given servicing will be done in FIFO order .. And intially head is at X all differences will be mod values : so |x-25| + |76-25|+|76-43|+|43-10|+|67-10|= 194 which is |x--25|=20 so possible ans are 5 and 45 both . correct me if i am wrong sir. Amit Pal answered Jan 16, 2017 • selected Jan 21, 2017 by Bikram Amit Pal comment Share Follow See all 6 Comments 6 6 Comments reply Show 3 previous comments Pankaj Joshi commented Jan 21, 2017 reply Follow flag I think adding a line that x >25 can remove the ambiguity 2 2 replyShare Bikram commented Jan 21, 2017 reply Follow flag humm good idea, though i change the range of answers , now it is 5-45 so take both 5 and 45 values. 0 0 replyShare Pankaj Joshi commented Jan 21, 2017 reply Follow flag oh I didn't know that you can specify two discrete values I thought it can only be a range thats why i didnt suggest it because then it will accept everything in between 0 0 replyShare Please log in or register to add a comment.
1 1 vote First assume the head is at 25. Hence total disk head movements will be = (76-25) + (76-43) + (43-10) + (67-10) =174. (As the requests are served in FIFO order). Now in question the total movement is given as 194. So we need to move extra (194-174)=20 tracks which is only possible if at the begining the head was at (20+25)=45. Gaurab Ghosh answered Jan 16, 2017 Gaurab Ghosh comment Share Follow See all 3 Comments 3 3 Comments reply asu commented Jan 17, 2017 reply Follow flag @arjun sir ,,bikram sir why 5 cant be a ans 2 2 replyShare Tarun Pandey commented Jan 17, 2017 reply Follow flag Answer could be 5 also...please correct it in the answer key 3 3 replyShare Bikram commented Jan 21, 2017 reply Follow flag @asu and @tarun corrected. 0 0 replyShare Please log in or register to add a comment.