# EXAMPLE OF DISK SCHEDULING

Work Queue: 23, 89, 132, 42, 187

There are 200 cylinders numbered from 0 – 199

The disk head starts at number 100.

The Total distance that the disk arm will move using different disk scheduling algorithms is given:

FCFS Algorithm:

Total time is estimated by total arm motion

= |100-23| + |23-89| + |89-132| + |132-42| + |42-187|

= 77 + 66 + 43 + 90 + 145

= 421 cylinders

SSTF Algorithm:

Total time is estimated by total arm motion

= |100-89| + |89-132| + |132-187| + |187-42| + |42-23|

= 11 + 43 + 55 + 145 + 19

= 273 cylinders

SCAN Algorithm:

= |100-89| + |89-42| + |42-23| + |23-0| + |0-132| + |132-187|

= 11 + 47 + 19 + 23 + 132 + 55

= 287 cylinders

LOOK Algorithm:

= |100-89| + |89-42| + |42-23| + |23-132| + |132-187|

= 11 + 47 + 19 + 109 + 55

= 241 cylinders

C-SCAN Algorithm:

= |100-89| + |89-42| + |42-23| + |23-0| + |0-199| + |199-187| + |187-132|

= 11 + 47 + 19 + 23 + 199 + 12 + 55

= 366 cylinders

C-LOOK Algorithm:

= |100-89| + |89-42| + |42-23| + |23-187| + |187-132|

= 11 + 47 + 19 + 164 + 55

= 296 cylinders