This project is a university assignment focused on demonstrating and comparing different disk scheduling algorithms. It's developed in Java using the JavaFX framework, allowing you to simulate and visualize how a disk head moves to fulfill read/write requests, offering a clear understanding of each algorithm's efficiency.
The application includes the following disk scheduling algorithms:
- FCFS (First-Come, First-Served)
- SSTF (Shortest Seek Time First)
- SCAN (Elevator Algorithm)
- C-SCAN (Circular SCAN)
- EDF (Earliest Deadline First) - Real-time algorithm
- FD-SCAN (Feasible Deadline SCAN) - Real-time algorithm
The graphical interface (GUI) provides a comprehensive environment for simulation and analysis:
- Visual Disk Head Path: See a graphical representation of the disk head's movement for each algorithm, making complex concepts easy to grasp.
- Algorithm Selection: Choose the specific disk scheduling algorithm you want to test.
- Customizable Parameters:
- Number of Requests: Specify how many requests the algorithm needs to process.
- Disk Size: Define the total range of the disk along which the head will move.
- Detailed Simulation Results: After each simulation, the application returns:
- Total Simulation Time: Measured in pseudo-time units.
- Sum of All Head Movements: The total distance the disk head traveled.
- Number of Killed Requests: (Applicable only for real-time algorithms: EDF and FD-SCAN) Requests that could not be serviced within their deadline.
- Batch Simulation & Comparison: Use the "Pre generate" option to run all algorithms with the same dataset. This feature also displays a comparative table of the total head movements for all algorithms, making performance comparison straightforward.
- Set Parameters: Locate the parameters at the bottom of the window. Adjust the number of requests and disk size according to your simulation needs.
- Run Single Simulation: Press the button corresponding to the algorithm you wish to test. The results and the disk head's path will be displayed.
- Run All Simulations (Pre-generate): To test all algorithms with the identical request data, check the "Pre generate" box on the right side of the window (under the simulation results). This will also show a comparative table of head movements for all algorithms.
- Java: The core programming language.
- JavaFX: For building the graphical user interface (GUI).
