TL

ML-guided scheduling

TaskSim Lab Model Inspection

What the model predicts

The model predicts how much CPU time a process is likely to need. The scheduler then turns that prediction into a score. A lower score means “run this process sooner.”

score = predicted_runtime + 0.65 x deadline_slack - 2 x priority

The running app loads an XGBoost model trained on a normalized sample of the real Alibaba cluster trace. When you enter tasks manually, the frontend sends every task to the backend, the backend predicts all runtimes in one batch, then the scheduler uses those predictions.

1Alibaba tracebatch_task.csv
to
2Normalizearrival, burst, deadline, priority
to
3Train XGBoostruntime regression
to
4Batch predictmanual tasks or trace tasks
to
5Schedulerank ready tasks by score

Local training artifact

Real Alibaba trace sample
Trace sourceAlibaba cluster-trace-v2018
Raw tablebatch_task.csv
Training rows100,000
Validation RMSE26.71
Model filealibaba_xgboost_100k.json
Top featuresruntime, slack, priority

Features

Exported by the simulator
requested_runtimeThe burst time entered by the user or normalized from a trace.
deadline_slackHow much time remains before the deadline. More slack means less urgent.
priorityImportance of the task. Higher priority lowers the score so it can run earlier.
io_intervalHow frequently the task blocks for I/O.
io_durationExpected I/O wait duration after blocking.
ran_since_ioCPU time consumed since the last I/O block.

Training flow

  1. Download Alibaba batch_task.csv.
  2. Normalize rows into simulator tasks.
  3. Export runtime features with --mode export-features.
  4. Train XGBoost to predict observed runtime.
  5. Load the trained model in the backend.
  6. Batch-predict manual or generated tasks before scheduling.

Why this is useful

FIFO is easy to reason about but ignores urgency. MLFQ responds quickly but can create high context-switch overhead. The ML-guided policy tries to identify short, urgent, high-priority work before it turns into deadline misses.