How rudr-1705/adaptivesched works
AdaptiveSched++ is a single-core CPU scheduling simulator. Its main workflow loads or generates a workload, injects processes into a simulation coordinated by the controller, executes them through an adaptive scheduler and CPU engine, and reports performance metrics. The adaptive scheduler selects among policy implementations and can migrate queued work when switching. The README also documents benchmarking and an interactive comparison dashboard. Relationships for unsampled features are included only where the README documents them; source excerpts do not expose every runtime connection.
Main entry points: simulation_controller.cpp Simulation Controller · adaptive.cpp Adaptive Scheduler · ready_queue.cpp Ready Queue · cpu.cpp CPU Engine
Components 19
Simulation
- CLI Entry
main.cpp - Workload Loader
src/simulation/workload.cpp - Process Generator
src/simulation/process_generator.cpp - Simulation Controller
src/simulation/simulation_controller.cpp
Scheduling
- Scheduler Interface
src/scheduler/scheduler.cpp - Adaptive Scheduler
src/scheduler/adaptive.cpp - FCFS Policy
src/scheduler/fcfs.cpp - SJF Policy
src/scheduler/sjf.cpp - Round Robin
src/scheduler/rr.cpp - Priority Policy
src/scheduler/priority.cpp - MLFQ Policy
src/scheduler/mlfq.cpp
Runtime Core
- CPU Engine
src/execution/cpu.cpp - Logical Clock
src/core/clock.cpp - Process State
src/core/process.cpp - Ready Queue
src/core/ready_queue.cpp
Analysis Tools
- Statistics Engine
src/metrics/statistics.cpp - Benchmark Runner
benchmark.py - Interactive Dashboard
generate_dashboard.py
Other components
- User
Connections 26
- User → CLI Entry: runs
readme.md - CLI Entry → Simulation Controller: starts
main.cpp - CLI Entry → Workload Loader: loads profile
main.cpp - Simulation Controller → Logical Clock: resets
src/simulation/simulation_controller.cpp - Simulation Controller → Adaptive Scheduler: creates
src/simulation/simulation_controller.cpp - Simulation Controller → CPU Engine: creates
src/simulation/simulation_controller.cpp - Simulation Controller → Process Generator: starts
src/simulation/simulation_controller.cpp - Simulation Controller → Statistics Engine: records ticks
src/simulation/simulation_controller.cpp - Workload Loader → Process Generator: supplies descriptors
- Process Generator → Simulation Controller: injects processes
- CPU Engine → Adaptive Scheduler: dispatches through
- CPU Engine → Logical Clock: advances
- CPU Engine → Simulation Controller: completion callback
src/simulation/simulation_controller.cpp - Adaptive Scheduler → FCFS Policy: delegates to
- Adaptive Scheduler → Round Robin: delegates to
- Adaptive Scheduler → Priority Policy: delegates to
- Adaptive Scheduler → MLFQ Policy: delegates to
- Scheduler Interface → Ready Queue: uses
- FCFS Policy → Ready Queue: uses
- SJF Policy → Ready Queue: uses
- Round Robin → Ready Queue: uses
- Priority Policy → Ready Queue: uses
- MLFQ Policy → Ready Queue: uses
- Adaptive Scheduler → Statistics Engine: reports metrics
- Statistics Engine → Benchmark Runner: benchmarks results
- Benchmark Runner → Interactive Dashboard: visualizes comparisons
readme.md