@vijaycs If nothing is given(and suppose we have to fill in numerical) by default we have to take from 0 to 149. Isn't it??

Dark Mode

1,647 views

1 vote

Consider a disk queue with I/O requests on the following cylinders in their arriving order: $6,10,12,54,97,73,128,15,44,110,34,45$. The disk head is assumed to be at cylinder $23$ and moving in the direction of decreasing number of cylinders. Total number of cylinders in the disk is $150$. The disk head movement using SCAN –scheduling algorithm is:

- $172$
- $173$
- $227$
- $228$

1

5 votes

All options incorrect ans should be = 151

disk head initailly at 23 and direction is towards 0

first arrange in sorted order and use SCAN method

6 `10 12 15 34 44 45 54 73 97 110 128

now from 23 to 15 then 15 to 12 and 12 to 10 and 10 to 6 then 6 to 0 then 0 to 34 34 to 44 and so on finally stops at 128

total head movements = 8+3+2+4+6+34+10+1+9+19+24+13+18 =151 it will not go to 150 (bounadary so can not be option B 173)

disk head initailly at 23 and direction is towards 0

first arrange in sorted order and use SCAN method

6 `10 12 15 34 44 45 54 73 97 110 128

now from 23 to 15 then 15 to 12 and 12 to 10 and 10 to 6 then 6 to 0 then 0 to 34 34 to 44 and so on finally stops at 128

total head movements = 8+3+2+4+6+34+10+1+9+19+24+13+18 =151 it will not go to 150 (bounadary so can not be option B 173)

0 votes

As we know the SCAN Scheduling Algorithm is also know as Elevator algorithm, it scans from the one end to another end.

In this case head starts from 23 onwards 1 (in the direction of decreasing number of cylinders) and then moves to the another end i.e., 150 (Total number of cylinders in the disk is 150)

Hence total head movement = 23 to 1 + 1 to 150

= 23 + 150

= 173 (Option B)

Answer: B

In this case head starts from 23 onwards 1 (in the direction of decreasing number of cylinders) and then moves to the another end i.e., 150 (Total number of cylinders in the disk is 150)

Hence total head movement = 23 to 1 + 1 to 150

= 23 + 150

= 173 (Option B)

Answer: B

What I mean is that after reaching 1 it will go to another end servicing the middle cylinders on the way.

C-SCAN simply means going to another end without servicing middle requests.

Cylinders are: 6, 10, 12, 54, 97, 73, 128, 15, 44, 110, 34, 45

In Asc Order: 6, 10, 12, 15, 34, 44, 45, 54, 73, 97, 110, 128

So when we are using SCAN (and the direction of moving is in decreasing number of cylinders) then the head will move 23 (initial position) to 1 and attend 15, 12, 10, 6 on its way. Then it will move from this end to another end servicing the requests in 34, 44, 45, 54, 73, 97, 110, 128 order till end i.e., to 150. Hence total movement will be 23 to 1 + 1 to 150. Hence the answer.

C-SCAN simply means going to another end without servicing middle requests.

Cylinders are: 6, 10, 12, 54, 97, 73, 128, 15, 44, 110, 34, 45

In Asc Order: 6, 10, 12, 15, 34, 44, 45, 54, 73, 97, 110, 128

So when we are using SCAN (and the direction of moving is in decreasing number of cylinders) then the head will move 23 (initial position) to 1 and attend 15, 12, 10, 6 on its way. Then it will move from this end to another end servicing the requests in 34, 44, 45, 54, 73, 97, 110, 128 order till end i.e., to 150. Hence total movement will be 23 to 1 + 1 to 150. Hence the answer.

0