Basic Steps Involved in the C-LOOK Algorithm

  • Determine the initial position of the disk head.
  • Sort the pending disk requests in the order in which they will be serviced.
  • Scan the disk in the chosen direction, servicing requests as they are encountered.
  • When the last request in the current direction has been serviced, immediately return to the beginning of the disk and repeat the process.

C-LOOK Disk Scheduling Algorithm

C-LOOK Disk Scheduling Algorithm 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 the C-SCAN Algorithm but the seek time is better than the 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 request 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 in the other direction and services the remaining requests which gives a better uniform servicing as well as avoids wasting seek time for going till the end of the disk.

In this article, we will see given an array of disk track numbers and initial head position, our task is to find the total number of seek operations to access all the requested tracks if the C-LOOK disk scheduling algorithm is used. Also, write a program to find the seek sequence using the C-LOOK disk scheduling algorithm.

Similar Reads

Basic Steps Involved in the C-LOOK Algorithm

Determine the initial position of the disk head. Sort the pending disk requests in the order in which they will be serviced. Scan the disk in the chosen direction, servicing requests as they are encountered. When the last request in the current direction has been serviced, immediately return to the beginning of the disk and repeat the process....

Advantages of the C-LOOK Disk Scheduling Algorithm

It can provide better performance than the LOOK algorithm because it reduces the number of head movements required to access data on the disk. It is relatively simple to implement and does not require a large amount of memory or processing power. It can be efficient in terms of disk usage because it scans only the areas of the disk where data is located....

Disadvantages of the C-LOOK Disk Scheduling Algorithm

It may not be optimal in situations where there are large amounts of data to be read or written in one direction, as it could lead to a large number of requests being queued up in the opposite direction. It may not be suitable for real-time systems where fast response times are critical, as it does not prioritize requests based on their urgency or importance. It may lead to starvation of requests that are located far away from the current position of the disk head....

Algorithm of C-LOOK Disk Scheduling Algorithm

Step 1: Let the Request array represents an array storing indexes of the tracks that have been requested in ascending order of their time of arrival and the head is the position of the disk head....

Implementation of C-LOOK Disk Scheduling Algorithm

The implementation of the C-LOOK algorithm is given below. The distance variable is used to store the absolute distance between the head and the current track position, disk_size is the size of the disk. Vectors left and right store all the request tracks on the left-hand side and the right-hand side of the initial head position respectively....

FAQs On C-LOOK Disk Scheduling Algorithm

...