Problem

A disk contains 200 tracks (0-199) Request queue contains track no: 18, 170, 43, 140, 24, 16, 190 Current position of R/W head is 50 Calculate seek time.

Algorithms

FCFS (First Come First Served)

  • No starvation of any request
  • Slower comparatively
  • We follow the order of request queue

SSTF (Shortest Seek Time First)

  • Starvation can happen
  • From any position we always choose the next nearest position

SCAN

  • Order is given (towards greater or smaller)
  • We go from initial to the last possible track of disk (199) for towards greater order
  • Then we go in another direction covering all tracks (last is 16)

LOOK

  • Order is given (towards greater or smaller)
  • We go from initial to the last track (190) for towards greater order
  • Then we go in another direction covering all tracks (last is 16)

C-SCAN (Circular SCAN)

  • Order is given (towards greater or smaller)
  • We go from initial to the last possible track of disk (199) for towards greater order
  • Then we go to 0 track
  • Then we go towards greater order direction covering all tracks (last is 43)

C-LOOK (Circular LOOK)

  • Order is given (towards greater or smaller)
  • We go from initial to the last given track (190) for towards greater order
  • Then we go to left most track (16)
  • Then we go towards greater order direction covering all tracks (last is 43)