Operating Systems Lab Manual / OS C Scan Disk Scheduling Algorithm

Program Name Write a C Program for C Scan disk scheduling in operating systems
Theory
Circular SCAN (C-SCAN) scheduling algorithm is a 
modified version of SCAN disk scheduling algorithm 
but it serve the requests more uniformly. 

Like SCAN  / Elevator Algorithm, C-SCAN moves the head from 
one end servicing all the requests to the other end.

In C Scan the Head starts from one end of the disk and 
move towards the other end servicing all the requests in between.
After reaching end, the head reverses its direction.It then returns
to the starting end without servicing any request in between and 
starts serving the requests.
Program
Input
Enter Number of Requests:8
Enter Requests sequence:95 180 34 119 11 123 62 64
Enter Initial Head Positions:50
Enter Total Disk size:200
Enter Head Movements Directions(high = 1 and low = 0):1
Output
Total head movement is 382


Home     Back