edited by
2,114 views
2 votes
2 votes

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

$$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 $1$ ms to move from the cylinder to adjacent one and the shortest seek time first policy is used?

  1. $357$ ms
  2. $238$ ms
  3. $276$ ms
  4. $119$ ms
edited by

5 Answers

1 votes
1 votes
Initial position of the R/W head is on cylinder 50.

In SSTF, requests are served as following

Next Served     Distance Traveled
  50                   0
  34                  16
  20                  14   
  19                   1   
  15                   4   
  10                   5
   7                   3   
   6                   1   
   4                   2
   2                   2
   73                 71
-----------------------------------     
Total Dist         =  119

Total Time to satisfy all request = 119 * 1 ms = 119 ms

0 votes
0 votes

Cylinder access request Sequence : 4,34,10,7,19,73,2,15,6,20

 

Shortest Seek Time First :  The tracks which are closer to current disk head position should be serviced first.

 

Current Cylinder Position = 50

 

So, 50 --> 34 --> 20 --> 19 --> 15 --> 10 --> 7 --> 6 --> 4 --> 2 --> 73 will be disc access Sequence.

 

Time = [(50 - 34) + (34 - 20) + (20 - 19) + (19 - 15) + (15 - 10) + (10 - 7) + (7 - 6) + (6 - 4) + (4 - 2) + (73 - 2)] x 1

          = 16 + 14 + 1 +4 + 5 + 3 + 1 + 2 + 2 +71

          = 119ms

So,option (4) is correct option.

0 votes
0 votes
next served           distance traveled

34                               16

20                                14                                                                                                                                                                                    

 19                                 1

15                                    4

10                                    5

7                                      3      

6                                      1      

4                                      2

2                                      2

_                                  _

                                    119

 

    

 

-
Answer:

Related questions

1 votes
1 votes
1 answer
1
3 votes
3 votes
3 answers
2
Arjun asked Jul 2, 2019
1,862 views
Match List-I with List-II:$$\begin{array}{|c|c|c|c|} \hline {}& \text{List-I} & {} & \text{List-II} \\ \hline (a) & \text{Disk} & (i) & \text{Thread} \\ \hline (b) & \te...
3 votes
3 votes
2 answers
4
Arjun asked Jul 2, 2019
2,364 views
Which of the following are NOT shared by the threads of the same process?StackRegistersAddress spaceMessage queuea and db and ca and ba, b and c