Can a scheduler learn to pack two resources at once?
Three deterministic scheduling rules and exact reward accounting on a synthetic two-resource workload; no learned policy or production scheduler benchmark.
This notebook runs the complete saved experiment, checks its assertions, and regenerates the SVG from the computed results. Python 3.10+ and standard-library modules only. Place experiment.py and figure_generation.py beside the notebook. The exact loaded assets are recorded in notebook metadata.
FIFO: finish={'A': 2, 'B': 3, 'C': 4} mean_slowdown=2.000 reward=-6.000
scan: finish={'A': 2, 'B': 3, 'C': 2} mean_slowdown=1.667 reward=-5.000
shortest: finish={'A': 3, 'B': 1, 'C': 2} mean_slowdown=1.167 reward=-3.500
Capacity sweep checked all six scan orders at each of 16 CPU/memory combinations.
Every schedule obeys both capacity constraints and exactly reconciles cumulative reward with total slowdown.
Regenerated figure.svg from results.json.
Inspect the saved result
The article's static figure is available before running code. The regenerated figure.svg uses results.json, and every plotted quantity comes from the experiment.
Change an input in experiment.py, rerun both code cells, then compare the saved result and figure.
Python runs locally in this page. Saved results and figures are visible before execution.