recategorized
4,553 views
1 votes
1 votes

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:

  1. $172$    
  2. $173$  
  3. $227$ 
  4. $228$
recategorized

6 Answers

6 votes
6 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)
0 votes
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
edited by
0 votes
0 votes
It should be 151 after calculation

But i think they are considering the last also from 128 to 150 due to the SCAN algorithm will go to the end

So, 151+ (150-128)=173
Answer:

Related questions

4 votes
4 votes
5 answers
1
go_editor asked Mar 24, 2020
1,675 views
Which of the following is incorrect for virtual memory?Large programs can be writtenMore I/O is requiredMore addressable memory availableFaster and easy swapping of proce...
0 votes
0 votes
4 answers
2
go_editor asked Mar 24, 2020
1,489 views
Match the following for Unix file system : $\begin{array}{clcl} & \textbf{List-I} & {} & \textbf{List-II} \\ \text{a.} & \text{Boot block} & \text{i.} & \text{Informat...