Circular Look (C-Look) disk scheduling algorithm in operating system

0

 



Circular Look (C-Look) is a disk scheduling algorithm that is based on the Look algorithm and is used to manage the allocation of disk resources in a computer system. The C-Look algorithm is designed to reduce the total seek time for disk requests and improve the overall performance of disk access in a computer system.


In C-Look, the disk head moves towards the nearest disk request in the same direction until it reaches the end of the disk, then it changes direction and moves towards the other end of the disk. The disk head services disk requests as it encounters them, moving towards the nearest disk request until there are no more requests in the current direction.


The process of scheduling disk requests in C-Look is as follows:

Keep track of the current position of the disk head: The current position of the disk head can be stored in a simple variable.

Keep track of the list of disk requests: The disk requests can be stored in an array or a linked list. Each entry should include the cylinder number of the disk request.

Service disk requests: A loop can be used to iterate over the list of disk requests and select the next disk request to be serviced. The disk head moves in the direction of the nearest disk request and services it before moving on to the next nearest request.

Update the current position of the disk head and the list of disk requests: After a disk request has been serviced, the current position of the disk head should be updated to the cylinder number of the disk request that was just serviced, and the disk request should be removed from the list of disk requests.

Change direction: When the disk head reaches the end of the disk, it changes direction and moves towards the other end of the disk, servicing disk requests as it encounters them.

The total seek time for all disk requests can be calculated and compared to other disk scheduling algorithms to determine the best approach for a given set of disk requests.


C-Look has several advantages over other disk scheduling algorithms. For example, it provides a more efficient approach to disk scheduling, as it reduces the total seek time for disk requests. Additionally, it is a fair and predictable algorithm, as disk requests are serviced based on their proximity to the current position of the disk head.


However, C-Look also has some disadvantages. For example, it may not be well-suited for systems with a large number of disk requests, as the time required to seek the disk can become quite large. Additionally, it may not be the best choice for systems with heavy disk I/O, as it may not be able to keep up with the high number of disk requests.


In conclusion, C-Look is a disk scheduling algorithm that provides a more efficient approach to disk scheduling by reducing the total seek time for disk requests. While it provides a fair and predictable approach to disk scheduling, it may not be the best choice for systems with a large number of disk requests or heavy disk I/O. When choosing a disk scheduling algorithm, it's important to consider the specific needs and requirements of your system, as well as the characteristics of your workload, to determine the best approach for your specific situation.


Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !