in Operating System
5,472 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.
in Operating System
5.5k views

4 Comments

To answer the 2nd part, we should be knowing the head movement direction.
8
8
But what if the movement is not given?
1
1

@Bikram

in this given sequence 65 are repeated 

suppose we are using First come first served when we are calculating seek time two time 65 use ??

using Shortest seek time first (SSTF)  on ly one time 65 use ?

because next shortest 65 both are same !!!

please clear 

 

0
0
1. SSTF –  50,49,53,55,65,65,78,36,20,16,12,3,1

2. Elevator disk scheduling policies:-

SCAN – 50,49,36,20,16,12,3,1,53,55,65,65,78
C-SCAN – 50,49,36,20,16,12,3,1,78,65,65,55,53
(assuming head moving to left first.)
0
0

2 Answers

19 votes
19 votes
Best answer
  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

4 Comments

depends on the direction of head movement. No such convention...
7
7
For $2^{nd}:50,49,36,20,16,12,3,1,53,55,65,65,78$ is also possible
15
15
correct Lakshman
0
0
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

by

Related questions