295 views

Suppose that a disk drive has $5000$ cylinders, numbered $0$ to $4999$. The drive is currently serving a request at cylinder $143$, and the previous request was at cylinder $125$. The queue of pending requests, in FIFO order, is $86, \ 1470, \ 913, \ 1774,\ 948, \ 1509, \ 1022, \ 1750, \ 130$.

Starting from the current head position, what is the total distance (in cylinders) that the disk arm moves to satisfy all the pending requests, for each of the following disk – scheduling algorithms?

FCFS
SSTF
SCAN

1. $7081, \ 1745, \ 9769$
2. $7081, \ 1745, \ 7081$
3. $1745, \ 1004, \ 9600$
4. $9769, \ 1745, \ 7081$

The total seek time is sum of difference between successive head positions.
A  The FCFS schedule is 143, 86, 1470, 913, 1774, 948, 1509, 1022, 1750, 130. The total seek distance  is 7081.

B  The SSTF schedule is 143, 130, 86, 913, 948, 1022, 1470, 1509, 1750, 1774. The total seek distance is 1745.

C  The SCAN schedule is 143, 913, 948, 1022, 1470, 1509, 1750, 1774, 4999, 130, 86. The total seek distance is 9769 .
by

Ok so it means, to decide the direction in the question they will directly give the direction or

If ( previous request < current req)  then right direction

If ( previous request > current req)  then left direction

Right sir??
Yes I think so @Shubhanshu
if there is a senior around,should we attempt questions this big in GATE examination ?.It took me 8-9 min to solve it

1 vote