C.L.O.O.K
Theory :
  C-LOOK is an enhanced version of both SCAN as well as LOOK disk scheduling algorithms. This algorithm also uses the idea of wrapping the tracks as a circular cylinder as C-SCAN algorithm but the seek time is better than C-SCAN algorithm. We know that C-SCAN is used to avoid starvation and services all the requests more uniformly, the same goes for C-LOOK. In this algorithm, the head services requests only in one direction(either left or right) until all the requests in this direction are not serviced and then jumps back to the farthest request on the other direction and service the remaining requests which gives a better uniform servicing as well as avoids wasting seek time for going till the end of the disk.




Advantages:

  • In C-LOOK the head does not have to move till the end of the disk if there are no requests to be serviced.
  • There is less waiting time for the cylinders which are just visited by the head in C-LOOK.
  • C-LOOK provides better performance when compared to LOOK Algorithm.
  • Starvation is avoided in C-LOOK.
  • Low variance is provided in waiting time and response time.

Disadvantages:

  • In C-LOOK an overhead of finding the end requests is present.

Example:

The following chart shows the sequence in which requested tracks are serviced using C-LOOK.


Therefore, the total seek count = (60 – 50) + (79 – 60) + (92 – 79) + (114 – 92) + (176 – 114) + (176 – 11) + (34 – 11) + (41 – 34) = 321

Steps to excute:

  • Input the queue you want to be scheduled using CLOOK.
  • Input the current position of the head.
  • After execution of the queue you will get the required seek count and the seek sequence.
Output of the algorithm