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

Advertisements

Give A message for us

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s