Need a C program that implements the following disk-scheduling algorithm FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK
Program will service a disk with 5,000 cylinders numbered 0 to
4,999. The program will generate a random series of 1,000 cylinder
requests and service them according to each of the algorithms listed
above. The program will be passed the initial position of the disk head
(as a parameter on the command line) and report the total amount of
head movement required by each algorithm.
***Instead of having each algorithm look at the entire 1000 requests at once,
restrict them to a “window” of 100 requests at a time. Also, loop the entire process about 10 times (i.e. 10 x
(generate 1000 random requests and run the set on each algorithm)) and, at the end, output the average head
movements for each algorithm.
Note for each iteration: once you generate 1000 random requests, each algorithm should run over that same
set of 1000.***