5,457 views
16 votes
16 votes

Assuming the current disk cylinder to be $50$ and the sequence for the cylinders to be $1, 36, 49, 65, 53, 12, 3, 20, 55, 16, 65$ and $78$ find the sequence of servicing using 

  1. Shortest seek time first (SSTF) and
  2. Elevator disk scheduling policies.

2 Answers

Best answer
19 votes
19 votes
  1. SSTF
    Sequence will be $\Rightarrow 50, 49, 53, 55, 65, 65, 78, 36, 20, 16, 12, 3, 1$
     
  2. Elevator disk scheduling (SCAN) 
    Here, I assume $78$ is the extreme point
    Sequence will be $\Rightarrow 50, 53, 55, 65, 65, 78, 49, 36, 20, 16, 12, 3, 1$

SCAN(Elevator)

It scans down towards the nearest end first

edited by
2 votes
2 votes

In SSTF, it is same as Closest Cylinder First, therefore the sequence will be 50,49,53,55,65,65,78,36,20,16,12,3,1.

In Elevator Disk Scheduling policy, head moves in one direction and goes till the end the process the request of the other end. Head can move in any of the direction first since it is not specified. So there are two possible sequence

Assuming 78 is the extreme right cylinder and 1 be extreme left cylinder.

1st → 50, 49, 36, 20, 16, 12, 3, 1, 53, 55, 65, 65, 78

2nd  → 50, 53, 55, 65, 65, 78, 49, 36, 20, 16, 12, 3, 1

Related questions

16 votes
16 votes
2 answers
2
56 votes
56 votes
7 answers
3