Skip to content

NguyenNgocMinh30012005/OperatingSystem2024.2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OperatingSystem2024.2

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.

Project Summary

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

Repository Structure

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

Methods

Baseline ML Scheduler

Step 2 trains an XGBoost model and exports the scheduler to ONNX for inference.

PPO RL Scheduler

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.

Current Result

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.

How To Reproduce

Install dependencies:

pip install -r requirements.txt

Train the PPO scheduler:

cd Step4
python train_rl_agent.py

Evaluate the trained model:

python evaluate_model.py

My Contribution

  • 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.

About

Operating Systems course project: AI-assisted CPU scheduling with XGBoost and PPO reinforcement learning.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 92.4%
  • Python 7.6%