A java/javafx program which visualizes a few process scheduling algorithms, for teaching/learning purposes.
- First come first serve.
- Shortest job first (preemptive and non-preemptive).
- Priority (preemptive and non-preemptive).
- Round Robin.
You can add secondary selection criteria for the FCFS, SJF and Priority algorithms. For example, if you choose FCFS and two jobs arrive at the same time, you can configure the algorithm to choose whichever is shortest, or whichever has priority.
- Processor's schedule, specifying which job is being done during each time frame.
- Average turnaround time.
- Average wait time.
- Wait time, turnaround time, and finish time for each process.
- Full input checking with error messages (except for unique process IDs).
- Clear Gantt chart of the schedule, with color-matched time frames.
- Tooltip indicating process's status at the end of each time frame (Hover the cursor over the time frame).
The GUI version runs on JavaFX. If you're compiling it on your own, or if you're running it without the bundled JRE, make sure to have JavaFX with your local JDK or JRE. You can download Java 8 which includes JavaFX.
- Download the
.zip
of your choice from the releases page. - Run the application.
- Input the processes' details:
- Number of processes (Console version)
- Process ID : the name/identifier of the process.
- Time of arrival (≥ 0) : when the process was launched.
- CPU time (> 0) : how long the process will take.
- Priority (smaller value corresponds to higher priority) : used for priority scheduling.
- Configure the algorithm:
- Choose the main scheduling method.
- Choose whether or not it's preemptive (if applicable).
- Choose any secondary selection criteria (if applicable).
- Choose the time quantum (if the algorithm is Round Robin).
- View the processor's schedule.
- View the average wait and turnaround times.
- View information about each of the processes' execution.
Scheduler.java
simulates the process scheduler. It provides methods for configuring the job queue and the schduling algorithm, as well as returning the final schedule.ConsoleApp.java
provides a text-based interface for the scheduler.GUIApp.java
provides a graphical user interface for the scheduler, using JavaFX.
Icons from google/material-design-icons.