A desktop CPU scheduling simulator built with Java 21+ and JavaFX, featuring:
- Scheduling algorithms: FCFS, SJF, SRTF, Priority (Preemptive / Non-Preemptive), and Round Robin.
- A modern JavaFX UI with CSS styling.
- Gantt-like timeline visualization.
- Metrics: waiting time, turnaround time, response time, CPU utilization, throughput.
- An optional AI Assist that heuristically suggests an algorithm based on burst variance.
- JDK 21+ installed (
java -version
to verify). - Maven 3.9+ installed (
mvn -v
to verify).
mvn clean javafx:run
mvn exec:java -Dexec.mainClass="com.wearl.scheduler.ui.App" -Dexec.args="--ai-assist"
mvn exec:java -Dexec.mainClass="com.wearl.scheduler.ui.App"
Build a runnable JAR:
mvn -DskipTests package
The artifact will be at:
target/cpu-task-scheduler-1.0.0.jar
Run it with:
java -jar target/cpu-task-scheduler-1.0.0.jar
-
Algorithms
- First Come First Serve (FCFS)
- Shortest Job First (SJF)
- Shortest Remaining Time First (SRTF)
- Priority Scheduling (Preemptive and Non-Preemptive)
- Round Robin (with configurable quantum)
-
User Interface
- Built with JavaFX + CSS for a clean, modern look.
- Timeline visualization for executed slices (Gantt-like chart).
- Metrics dialog with averages and per-process statistics.
- AI Assist: suggests an algorithm given workload characteristics.
- Enter processes: ID, Arrival, Burst, and (optionally) Priority.
- Choose a scheduling algorithm.
- For Round Robin, set the quantum value.
- (Optional) Enable AI Assist to let the tool suggest an algorithm.
- Click Run to visualize the execution timeline and view calculated metrics.
- JavaFX provides a contemporary scene graph and CSS theming, making it suitable for modern desktop apps in 2025.
- For distribution, consider:
This project is licensed under the MIT License - see the LICENSE file for details.
Saurabh
- Portfolio: saurabhh.in
- Email: Saurabh@wearl.co.in
Contributions are welcome! Please fork the repository and submit a pull request.
If you encounter any issues or have feature requests, please open an issue on the GitHub repository.
⭐ Star this repository if you find it helpful! ⭐