recategorized by
1,241 views
4 votes
4 votes

Consider a disk sequence with $100$ cylinders. The request to access the cylinder occur in the 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 $2\,ms$ to move from one cylinder to adjacent one and shortest seek time first policy is used?

  1. $190$
  2. $238$
  3. $233$
  4. $276$
recategorized by

3 Answers

Best answer
7 votes
7 votes

Shortest Seek Time First (SSTF) : Process the request which is reachable by moving the heads the minimum amount.

  • Currently head is at 50 .Nearest cylinder will be 34
  • Head will continue leftwards until it reach cylinder 2.  Moves 50- 2 = 48 cylinders
  • Then it will process cylinder 73. moves 73-2=71
  • Total moves = 48+71 =119
  • Total time taken = 119* 2 =238 ms

Answer is B

selected by
1 votes
1 votes
2 4 6 7 10 15 19 20 34 73

head is at cylinder 50 so it moves to 34 (SSTF) and then left upto 2 and then to cylinder 73.

ie, (50-2) + (73-2) =119

2 ms to move between cylinders.

So 119 x 2=238ms

option (B)
0 votes
0 votes
As shortest seek time algorithm is used and the head starts from cylinder 50, the order followed is :

 

50→37→20→19→15→10→7→6→4→2→73

So, as it takes 1 ms to move to adjacent cylinder, the time taken is:

13+17+1+4+5+3+1+2+2+71 =119 ms

 

Total time taken = 119* 2 =238 ms

 

Hence option (B) is right answer.
Answer:

Related questions

6 votes
6 votes
2 answers
1
gatecse asked Dec 17, 2017
3,131 views
A counting semaphore was initialized t o $7$. Then $\text{20 P (wait)}$ operations and$\text{x V (signal)}$ operations were completed on this semaphore. If the final valu...
2 votes
2 votes
1 answer
2
gatecse asked Dec 17, 2017
2,924 views
Consider the following table :$\begin{array}{|l|l|l|} \hline \textbf{A.} & \text{Activation record} & \textbf{p.} & \text{Linking loader} \\\hline \textbf{B.} & \text{Loc...