Disk Scheduling

Disk Scheduling is the process of selecting and ordering the access of requests for data from a hard disk. The disk scheduling algorithms help in optimizing the performance of the disk system and reducing the access time. There are various disk scheduling algorithms, such as FCFS (First Come First Serve), SSTF (Shortest Seek Time First), SCAN, C-SCAN, LOOK, and C-LOOK. In this essay, we will focus on C-SCAN scheduling.

C-SCAN (Circular SCAN) is a disk scheduling algorithm that works in a circular fashion. It is a modified version of the SCAN algorithm, where the head of the disk moves only in one direction, either from the outermost track to the innermost track or vice versa. In C-SCAN, the head of the disk moves from one end of the disk to the other end, and when it reaches the end, it returns to the starting point without servicing any request in between.

Let us consider an example to understand C-SCAN scheduling. Suppose we have a disk with 200 tracks numbered from 0 to 199. The head of the disk is initially at track number 53, and the requests arrive in the following order: 98, 183, 37, 122, 14, 124, 65, 67. The direction of head movement is from track 0 to track 199.

Firstly, we arrange the requests in the order of their arrival time in the request queue.

Request Queue: 98, 183, 37, 122, 14, 124, 65, 67.

Next, we apply C-SCAN scheduling algorithm to service these requests.

  1. Initially, the head is at track 53, and the direction of head movement is from track 0 to track 199.
  2. The head moves towards the higher numbered tracks and services the requests that are in its path. It services the requests 65 and 67 in the order of their arrival as they are present in its path.
  3. After servicing request 67, the head reaches the end of the disk, i.e., track 199.
  4. As per C-SCAN scheduling, the head returns to the starting point without servicing any requests in between.
  5. The head reaches track 0 and moves towards higher numbered tracks. It services the requests 98, 122, 124, and 183 as they are in its path.
  6. After servicing the request 183, the head reaches the end of the disk, i.e., track 199.
  7. As per C-SCAN scheduling, the head returns to the starting point without servicing any requests in between.
  8. The head reaches track 0 and moves towards higher numbered tracks. It services the request 37 and then reaches the end of the disk, i.e., track 199.
  9. As per C-SCAN scheduling, the head returns to the starting point without servicing any requests in between.
  10. The head reaches track 0 and moves towards higher numbered tracks. It does not encounter any request in its path, so it moves straight to track 14 and services the request.
  11. Finally, the head reaches the end of the disk, i.e., track 199, and returns to the starting point without servicing any requests in between.

Thus, the sequence of service for the given requests in C-SCAN scheduling is 65, 67, 98, 122, 124, 183, 37, 14.

In conclusion, C-SCAN scheduling is a disk scheduling algorithm that works in a circular fashion and reduces the average waiting time for the requests. It is particularly useful when the disk head movement time is much larger than the time taken to transfer data between the disk and

JOIN OUR NEWSLETTER
And get notified everytime we publish a new blog post.