Introduction
Operating system schedulers serve as the critical "traffic controllers" of computing systems, determining process allocation for CPU resources. Traditional monolithic policies, such as Linux’s Completely Fair Scheduler (CFS) or the newer EEVDF, attempt to balance fairness, throughput, and latency across all workloads. However, modern computing environments are increasingly heterogeneous, featuring diverse hardware (e.g., Intel’s hybrid architectures) and conflicting application requirements—ranging from low-latency gaming to high-throughput data processing. This paper introduces the Adaptive Scheduling Agent (ASA), a framework that treats scheduling as a "Mixture-of-Experts" problem, dynamically routing workloads to specialized scheduling policies at runtime.
System Architecture
The ASA framework operates on a continuous perception-decision-action cycle, leveraging the Linux sched_ext framework to hot-swap schedulers without system interruption.
- Perception: ASA monitors system metrics—including CPU utilization, I/O activity, and network traffic—using lightweight eBPF and
procfsprobes. - Decision: An ensemble machine learning model (XGBoost) identifies abstract workload patterns. To prevent "thrashing" from transient noise, a Time-Weighted Probability Voting Algorithm applies exponential decay to ensure stable policy transitions.
- Action: The agent utilizes
sched_extto activate the most appropriate "expert" scheduler (e.g., BPFland or Rusty) for the current system state.
A key innovation is the decoupling of workload recognition from policy mapping. While workload patterns are hardware-agnostic, the mapping of a pattern to a specific "best" scheduler can be tuned for different hardware configurations, allowing the core model to remain universal.
Experimental Setup
The researchers evaluated ASA using a benchmark suite of 28 scenarios, pairing interactive applications (e.g., gaming, web browsing) with resource-intensive background tasks (e.g., kernel compilation). Testing spanned 10 virtual machine (VM) configurations, including 2 to 20 cores and asymmetric architectures. Four VMs served as training prototypes, while six were used to test the agent's ability to generalize to unseen hardware.
Performance and Results
ASA demonstrated significant improvements over the default Linux EEVDF scheduler. It achieved a win rate of 86.4% across all tested scenarios, with an average performance gain of +8.83%. Notably, the system's performance was even higher on "unseen" hardware (88.1% win rate), indicating robust generalization.
The agent's overhead is remarkably low, consuming approximately 1.45% of a single CPU core and 297 MB of RAM. Furthermore, ASA often outperformed the best single static scheduler because it can switch policies mid-task as a workload evolves, achieving a higher aggregate score than any individual expert could maintain.
Conclusion
The Adaptive Scheduling Agent proves that a learned router for expert policies can effectively overcome the limitations of monolithic OS schedulers. By intelligently switching between specialized policies, ASA provides a path toward truly adaptive operating systems. Future work will focus on expanding the portfolio of expert schedulers and implementing more granular, per-task-group routing logic.
Summary updated