The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+12 votes
2k views

Consider a disk system with $100$ cylinders. The requests to access the cylinders occur in following sequence:

$4, 34, 10, 7, 19, 73, 2, 15, 6, 20$

Assuming that the head is currently at cylinder $50$, what is the time taken to satisfy all requests if it takes $1ms$ to move from one cylinder to adjacent one and shortest seek time first policy is used?

  1. $95 \ ms$
  2. $119 \ ms$
  3. $233 \ ms$
  4. $276 \ ms$
asked in Operating System by Veteran (59.6k points)
edited by | 2k views

2 Answers

+16 votes
Best answer

Answer is (B).

$=(50-34)+(34-20)+(20-19)+(19-15)+(15-10)+(10-7)+(7-6)+(6-4)+(4-2)+(73-2)$

$=16+14+1+14+5+3+1+2+2+71$
$=119 \ ms$

 

answered by Active (4.2k points)
edited by
+17 votes
Here in case of Shortest seek time first we don't need to do lot of  substraction & addition in this type of questions. It seems like it is necessary to actually calculate  small differences ! It is better to just draw actual movement & Then do computation.

Here sequence is like

50->34->20->19->15->7->4->2->73

So we can calculate like (50-2) + (73-2) = 71+48 = 119.
answered by Boss (42.9k points)
0
50->34->20->19->15->7->4->2->73

So we can calculate like (50-2) + (73-2) = 71+48 = 119. what is reference for this trick and this is not working with other questions please someone confirm authenticity of this trick .
0
this trick always [email protected]
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

40,748 questions
47,471 answers
145,586 comments
62,234 users