Share
Explore BrainMass

SCAN, C_SCAN, and LOOK disk scheduling algorithms in Java

Implement the SCAN, C_SCAN, and LOOK disk scheduling algorithms in Java. Namely, the first command-line parameter must be the current head position. The list of cylinder requests must be read from the standard input, you can use input redirection for reading it from a file. Assume that the total number of cylinders on disk is 200.

The code must have a separate method for each scheduling algorithm and they all have to be called from the main() method. The output of each scheduling method must be the head positions (number of cylinder) made to serve the requests form the list according to the corresponding schedule (e.g., 16 - 73 - 24) and the total number of cylinders passed by the head in the course of the algorithm.

Attachments

Solution Preview

Please find attached 361562.zip that contains the implementations for the SCAN, C_SCAN, and LOOK disk scheduling algorithms.

Content of zip file is follows.

Archive: 361562.zip
Length ...

Solution Summary

Attached implementations start with the head movement from lower cylinder towards higher cylinder.

$2.19