edited by
6,667 views
0 votes
0 votes
Suppose a disk has 200 cylinders numbered from 0 to 199. At some time, disk arm is at cylinder 76 and there is a queue of disk access requests for cylinders:

54, 32, 108, 22, 67, 77, 87, 87, 42, 82

The distance that will be travelled by the R/W head when the SCAN (elevator) algorithm used is ________tracks. Assume that SCAN algorithm moves towards 199 when it starts execution.
edited by

2 Answers

2 votes
2 votes

The R/W head will follow the below sequence starting from initial disk arm position at cylinder 76:-

76 -> 77 -> 82 -> 87 -> 87 -> 108 -> 199 -> 67 -> 54 -> 42 -> 32 -> 22

Disk Arm Movement:

76 -> 77 = 1

77 -> 82 = 5

82 -> 87 = 5

87 -> 87 =0

87 -> 108 = 21

108 -> 199 = 91

199 -> 67= 132

67 -> 54 = 13

54 -> 42 = 12

42 -> 32 = 10

32 -> 22 = 10

Total Disk Arm Movement(Distance travelled by R/W header)=300

0 votes
0 votes

Head movement = (77-76)+(82-77)+(87-82)+(87-87)+(108-87)+(199-108)+(199-67)+(67-54)+(54-42)+(42-32)+(32-22) = 300

Related questions

0 votes
0 votes
1 answer
1
air1ankit asked Dec 9, 2017
624 views
any shortcut method for this??
0 votes
0 votes
1 answer
4