A professional C++17 benchmarking suite for OS scheduling algorithms. Designed for high-concurrency evaluation and architectural performance analysis.
The system follows a producer-consumer model for multi-core simulation.
graph TD
A[Workload Generator] --> B[Scheduler Engine]
B --> C{Ready Queue}
C -->|Mutex| D[ThreadPool Workers]
C -->|Lock-Free| D
D --> E[Metrics Collector]
E --> F[CSV Export]
E --> G[Visualization Script]
- FCFS: First-Come, First-Served.
- SJF: Shortest Job First.
- Round Robin: Time-sliced preemptive scheduling.
- Priority: Priority-based selection.
The core of the benchmark is the Michael-Scott Lock-Free Queue, which uses atomic compare_exchange operations to minimize synchronization overhead in high-concurrency scenarios.
make release
make test./build.bat
./build.bat test./scheduler --algo RR --processes 10000 --cores 8 --queue lockfree./scheduler --stress-test --cores 16 --queue lockfreeRun the full experiment sweep and generate visualizations:
# Windows
./benchmarks/run_benchmark.bat
python scripts/plot_results.py
# Linux
./benchmarks/run_benchmark.sh
python scripts/plot_results.pyThe following results were obtained on an 8-core simulated environment with 10,000 processes.
Analyze the scheduler efficiency using linux-perf:
# General stats
perf stat ./scheduler --processes 100000 --cores 16
# Cache and Branch analysis
perf record -e cache-misses,branch-misses ./scheduler
perf reportDeveloped as a high-performance systems engineering benchmark suite.


