C-SCAN Disk Scheduling | Disk Scheduling

Spread the love

Disk Scheduling Algorithms-

 

Before you go through this article, make sure that you have gone through the previous article on Disk Scheduling.

 

We have discussed-

  • Disk scheduling algorithms are used to schedule multiple requests for accessing the disk.
  • The purpose of disk scheduling algorithms is to reduce the total seek time.

 

Various disk scheduling algorithms are-

 

 

In this article, we will discuss about C-SCAN Disk Scheduling Algorithm.

 

C-SCAN Disk Scheduling Algorithm-

 

  • Circular-SCAN Algorithm is an improved version of the SCAN Algorithm.
  • Head starts from one end of the disk and move towards the other end servicing all the requests in between.
  • After reaching the other end, head reverses its direction.
  • It then returns to the starting end without servicing any request in between.
  • The same process repeats.

 

Also Read- FCFS Disk Scheduling Algorithm

 

Advantages-

 

  • The waiting time for the cylinders just visited by the head is reduced as compared to the SCAN Algorithm.
  • It provides uniform waiting time.
  • It provides better response time.

 

Disadvantages-

 

  • It causes more seek movements as compared to SCAN Algorithm.
  • It causes the head to move till the end of the disk even if there are no requests to be serviced.

 

Also Read- SSTF Disk Scheduling Algorithm

 

PRACTICE PROBLEM BASED ON C-SCAN DISK SCHEDULING ALGORITHM-

 

Problem-

 

Consider a disk queue with requests for I/O to blocks on cylinders 98, 183, 41, 122, 14, 124, 65, 67. The C-SCAN scheduling algorithm is used. The head is initially at cylinder number 53 moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) incurred while servicing these requests is _______.

 

Solution-

 

 

Total head movements incurred while servicing these requests

= (65 – 53) + (67 – 65) + (98 – 67) + (122 – 98) + (124 – 122) + (183 – 124) + (199 – 183) + (199 – 0) + (14 – 0) + (41 – 14)

= 12 + 2 + 31 + 24 + 2 + 59 + 16 + 199 + 14 + 27

= 386

 

Alternatively,

Total head movements incurred while servicing these requests

= (199 – 53) + (199 – 0) + (41 – 0)

= 146 + 199 + 41

= 386

 

To gain better understanding about C-SCAN Disk Scheduling Algorithm,

Watch this Video Lecture

 

Next Article- LOOK Disk Scheduling Algorithm

 

Get more notes and other study material of Operating System.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Summary
C-SCAN Disk Scheduling | Disk Scheduling
Article Name
C-SCAN Disk Scheduling | Disk Scheduling
Description
C-SCAN Disk Scheduling Algorithm is an improved version of the SCAN Disk Scheduling Algorithm. C-SCAN Disk Scheduling Example. C-SCAN Algorithm overcomes the disadvantage of SCAN Disk Scheduling Algorithm.
Author
Publisher Name
Gate Vidyalay
Publisher Logo

Spread the love