edited by
693 views

4 Answers

3 votes
3 votes
The requests in increasing order are : $30,55,85,100,105,110,126,135,195$

In $CSCAN$ we will first go to one end then go to other end and then the remaining requests

Initially at $100$ and moving right

The order of traversal would be :  

$100\rightarrow 105\rightarrow 110\rightarrow 126\rightarrow 135\rightarrow 195\rightarrow 199\rightarrow 0\rightarrow 30\rightarrow 55\rightarrow 85$

Distance traversed :

$|100-100|+|100-105|+|105-110|+|110-126|+|126-135|+|135-195|+|195-199|+|199-0|+|0-30|+|30-55|+|55-85|=0+5+5+16+9+60+4+199+30+25+30=383$

Correct me if i'm wrong
0 votes
0 votes
Using shortcut:

It is mentioned that CSCAN algorithm to be used is the disk head will move in right direction ( i.e. disk head will move to cylinder will higher number). Initially the head is at cylinder 100.

Sequence of cylinder requests are 30,85,110,100,105,126,135,55,195.

On moving from 100 to 199, the cylinders 100, 105,110, 126,135,195 will be serviced. So number of cylinders traversed = 199-100 = 99.

Then disk head will return to 0th cylinder without servicing any cylinder. Number of cylinders traversed = 199-0 = 199

Among the remaining requests, which are 30, 55, 85, 85th cylinder is the highest cylinder. Therefore on traversing from 0th to 85th cylinder, all the requests will be serviced. Thus number of cylinders traversed = 85-0 = 85.

Total number of cylinders traversed or distanced traversed by R/W head using CSCAN algo = 99 + 199 + 85 = 383
0 votes
0 votes
Answer is 283.

(199 – 100) + (199 – 0) + (85 – 0) = 283
0 votes
0 votes
Answer is 283.

The R/W head movement is (199 – 100) + (199 – 0) + (85 – 0) = 283.

Related questions

0 votes
0 votes
1 answer
3