How lavendercoder1129/cpu-scheduling-simulator works
This is an interactive CPU scheduling simulator: users choose a manual, CSV, or sample workload, provide a time quantum, run five algorithms, and view per-algorithm timelines, metrics, and a comparison. The graph preserves the documented algorithm and reporting capabilities. Source excerpts show the main orchestration and comparison rendering; some links involving unsampled implementations are omitted or marked unverified.
Main entry points: main.cpp Simulation orchestration · SchedulingResult.cpp Scheduling result · CLI.cpp Interactive CLI · FCFSScheduler.cpp FCFS scheduler
Components 15
Workload input
- Interactive CLI
src/CLI.cpp - CSV workload manager
src/WorkloadManager.cpp - Process model
src/Process.cpp
Scheduling algorithms
- Simulation orchestration
main.cpp - FCFS scheduler
src/FCFSScheduler.cpp - SJF scheduler
src/SJFScheduler.cpp - Priority scheduler
src/PriorityScheduler.cpp - Round Robin scheduler
src/RRScheduler.cpp - MLFQ scheduler
src/MLFQScheduler.cpp
Results and metrics
- Scheduling result
src/SchedulingResult.cpp - Gantt chart
src/GanttChart.cpp - Metric calculation
src/Statistics.cpp
Result presentation
- Detailed result display
src/StatisticsDisplay.cpp - Algorithm comparison
src/ComparisonEngine.cpp
Other components
- User
Connections 17
- User → Interactive CLI: selects input
- Simulation orchestration → Interactive CLI: requests workload
main.cpp - Interactive CLI → CSV workload manager: loads CSV
src/CLI.cpp - Simulation orchestration → FCFS scheduler: runs schedule
main.cpp - Simulation orchestration → SJF scheduler: runs schedule
main.cpp - Simulation orchestration → Priority scheduler: runs schedule
main.cpp - Simulation orchestration → Round Robin scheduler: runs schedule
main.cpp - Simulation orchestration → MLFQ scheduler: runs schedule
main.cpp - FCFS scheduler → Scheduling result: produces result
src/FCFSScheduler.cpp - SJF scheduler → Scheduling result: produces result
src/SJFScheduler.cpp - Priority scheduler → Scheduling result: produces result
src/PriorityScheduler.cpp - Round Robin scheduler → Scheduling result: produces result
src/RRScheduler.cpp - MLFQ scheduler → Scheduling result: produces result
src/MLFQScheduler.cpp - Simulation orchestration → Detailed result display: displays metrics
main.cpp - Simulation orchestration → Gantt chart: displays timeline
main.cpp - Simulation orchestration → Algorithm comparison: displays comparison
main.cpp - Scheduling result → Metric calculation: calculates metrics