This repository contains an Operating Systems course project focused on AI-assisted CPU scheduling. It includes a baseline machine-learning scheduler and a reinforcement-learning scheduler trained with PPO.
The project explores whether scheduling decisions can be learned from system features and simulated process states.
Implemented components include:
- Step 2: XGBoost-based scheduler model with ONNX export
- Step 4: PPO reinforcement-learning agent for CPU scheduling
- Evaluation scripts and saved training artifacts
- Setup guide and dependency files for reproducing the experiments
Step2/
README.md
offlineml.ipynb
xgb_os_sched.onnx
xgb_os_scheduler_gpu.json
Step4/
README.md
train_rl_agent.py
evaluate_model.py
test.py
models/
best_model/
evaluation_results/
SETUP.md
requirements.txt
Step 2 trains an XGBoost model and exports the scheduler to ONNX for inference.
Step 4 trains a PPO agent that observes process-level state features and chooses which process to schedule. The reward combines throughput, memory pressure, priority handling, I/O wait, fairness, and context-switch penalties.
The Step 4 setup reports a PPO scheduler result that is better than random
scheduling in the included evaluation workflow. See Step4/README.md and
Step4/evaluation_results/ for the existing training/evaluation artifacts.
Install dependencies:
pip install -r requirements.txtTrain the PPO scheduler:
cd Step4
python train_rl_agent.pyEvaluate the trained model:
python evaluate_model.py- Organized the public project repository for review.
- Added and maintained the ML/RL scheduler experiment structure.
- Documented how the scheduler training and evaluation steps fit together.