If you are new to disk scheduling then please read about basics of disk scheduling first and then read this post on C LOOK disk scheduling algorithm.
C LOOK disk scheduling algorithm is the last disk scheduling algorithm. It is a combination of C-SCAN disk scheduling algorithm and LOOK disk scheduling algorithm. So, let's start the discussion on C-LOOK disk scheduling algorithm along with its advantages and let's find out if there are some disadvantages of it or not.
C-LOOK disk scheduling algorithm
C-LOOK disk scheduling algorithm starts fulfilling the requests in one direction till it reaches the last track in that direction and then it reverts back to the other end without fulfilling any request and then again revert back and fulfill the requests and so on. It is a combination of both C-SCAN disk scheduling algorithm and LOOK disk scheduling algorithm.
Let's understand the concept with the help of an example:
98, 183, 41, 122, 14, 124, 65, 67
Fulfill the requests according to C-LOOK disk scheduling algorithm. The read/write head is at 53 initially.
soln
1. Initially the read/write head is at 53.
2. Then the read/write head will move in one direction either left or right (in my case it moves right).
3. The first request it fulfills will be 65.
4. Then it fulfills request 67.
5. Then it fulfills request 98.
6. Then it fulfills request 122.
7. Then it fulfills request 124.
8. Then it fulfills request 183.
9. Now it will not go to 199 just like LOOK algorithm and it will revert back from 183 and move till end without fulfilling any request just like C-SCAN algorithm.
10. Now it will fulfill the request 14.
11. Then it fulfills the request 41.
Advantages
1. C-LOOK disk scheduling algorithm gives a more uniform and better waiting time as compared to LOOK algorithm.
2. It is more efficient as compared to C-SCAN.
Disadvantages
1. Extra code or effort to build this algorithm.
2. It should not be used in case there is very high load.