2,815 views
0 votes
0 votes
Consider following disk request sequence for a disk with 100 tracks.

44, 20,95,4,50,52,47,61,87,25

Head pointer starting at 50. Find the no. of head movements in cylinders using SCAN scheduling. Assume head moving towards cylinder 99.

2 Answers

2 votes
2 votes

SCAN Algorithm:

When a new request arrives while the drive is idle, the initial arm/head movement will be in the direction of the cylinder where the data is stored, either in or out. As additional requests arrive, requests are serviced only in the current direction of arm movement until the arm reaches the edge of the disk. When this happens, the direction of the arm reverses, and the requests that were remaining in the opposite direction are serviced, and so on.
 

50->52 = 2 
52->61 = 9
61->87 = 26
87->95 = 8
95->99 = 4
99->47 = 52
47->44 = 3
44->25 = 19
25->20 = 5
20->4 = 16
Total = 144 head movements.

Alternate:
50->99 = 49
99->4 = 95
Total = 144 head movements

Answer) 144

1 votes
1 votes

In SCAN Algorithm, the disk arm(head) starts at one end of the disk and moves toward the other end servicing requests as it reaches each cylinder it gets to the other end of the disk. At the other end direction of the head movement is reversed and servicing continues.

For the given problem, first the arm  will move towards 99 and reverses back to Zero(0) as follows:

50->52->61->87>95->99->47->44->25->20->4.

Arm movements required to go from 50 to 52 = 2

Arm movements required to go from 52 to 61 = 9

Arm movements required to go from 61 to 87 = 26

Arm movements required to go from 87 to 95 = 8

Arm movements required to go from 95 to 99 = 4

Arm movements required to go from 95 to 47 = 52

Arm movements required to go from 47 to 44 = 3

Arm movements required to go from 44 to 25 = 19

Arm movements required to go from 25 to 20 = 5

Arm movements required to go from 20 to 4 = 16

Total head movements = 2+9+26+8+4+52+3+19+5+16 = 144

edited by

Related questions

1 votes
1 votes
0 answers
4
jatin khachane 1 asked Dec 11, 2018
1,123 views
Suppose a disk has 100 cylinders, numbered from 0 to 99. At some time the disk arm is at cylinder 20, and there is a queue of disk access requests for cylinders 10, 22, 6...