C Program designed to simulate disk scheduling algorithms
C Program designed to simulate the following disk scheduling algorithms
- FCFS
- SSTF
- SCAN
- C-SCAN
- LOOK
- C-LOOK
The program reads its request from a binary file called “request.bin”. It goes through 300 cylinder numbers (from 0 to 299). Based on the algorithm it would simulate moving. This program was developed as part of my CS 3SH3 : Operating Systems class.
The program takes the initial position of the disk head as the first command line argument and the direction of the head as the second command line argument.
To use this program, you have to first create an executable file.
- Download the diskscheduler.c file
- Run the following command to create an executable file:
- gcc diskscheduler.c -o diskscheduler
- To run the program, use a command in the following format:
- diskscheduler 100 LEFT
- Where 100 is the initial disk head position
- and LEFT is the direction the disk head will move
- diskscheduler 100 LEFT
All the Algorithms will be executed when this one command is run