in Operating System
1,113 views
1 vote
1 vote

Suppose a disk has 100 cylinders, numbered from 0 to 99. At some time the disk arm is at cylinder 20, and there is a queue of disk access requests for cylinders 10, 22, 6, 38, 2, 40, 20. 

No of seeks in

  1. FCFS
  2. SSTF
in Operating System
1.1k views

11 Comments

1. 164

2. 60
0
0
edited by
  1. 144
  2. 56
0
0
FCFS:164

SSTF;60
0
0
edited by
  1. FCFS : 164
  2. SSTF : 60
0
0
edited by

@Satbir Is this correct?

  1. FCFS$:164$
  2. SSTF$:60$ 
0
0
No ...it should be 164 because at first the head moves from 20 to 10 and processes it and at last it again comes back to process 20.

$20 -10 = 10$

$10-22 =12$

$22-6 = 16$

$6-38= 32$

$38-2 =36$

$2-40=38$

$40-20 = 20$

____________

Total = $164$

SSTF is correct.
1
1
Why head comes to  $20$ again?
0
0
see the last request its 20
1
1
Yes

It is FCFS ,so head come to $20$,but other than FCFS,head is not come,because it start from $20$

Is this correct?
0
0
Yes, depends on the policy used. like in SSTF 20 is processed first.
1
1
Yeah thanks
0
0

Please log in or register to answer this question.

Related questions