Modern operating system process schedulers typically enforce a static, ``one-policy-fits-all'' design, which inevitably compromises performance under the highly dynamic and mixed workloads of contemporary edge systems. Transitioning to dynamic adaptation faces two fundamental challenges: scenario specific static policies lack robust runtime adaptability, whereas computationally intensive AI-assisted policies introduce unacceptable execution overhead for resource-constrained devices. To structurally resolve this dilemma, we propose the Lightweight Adaptive Policy Switcher (LAPS), a framework that dynamically switches between predefined expert policies, thus decoupling high frequency context switching from low-frequency policy transitions and amortizing transitional overheads. To eliminate prohibitive online computations, LAPS pre-resolves all heavy dynamic tradeoffs via an offline preparation phase, constructing a strictly overhead-aware Policy Mapping Table. During runtime, it executes an agentic Observe-Infer-Switch cycle that limits machine learning inference strictly to workload classification. Consequently, LAPS executes efficient dynamic adaptation simply by mapping the inferred workload state to optimal expert policies via low-cost table lookups. Experiments show that LAPS achieves an average performance gain of 8.91% and reduces response latency by up to 91.7% in latency-sensitive tasks over the default Linux scheduler EEVDF. Our results demonstrate that LAPS outperforms the baseline in a wide range of test cases, offering a practical path toward more responsive and intelligent operating systems. Our code is publicly available at https://github.com/lvmiao233/LAPS.
Figures & tables
Fig. 1: Core Framework of the Lightweight Adaptive Policy Switcher. The periodic loop progresses sequentially: (1) Observation Module collects system status to extract workload features; (2) Inference Module classifies the workload and maps it to a best-fit scheduler; and (3) Execution Module evaluates switching necessity and safely attaches the new policy.
Fig. 2: The Workflow of Offline Preparation stages.
ID
BaseCPU
Cores
Thrd.
Mem
Proto.
Virtual Machine Environments
VM1
i5-6500
4
4
8G
✓
VM2
i5-6500
4
4
16G
✓
VM3
i5-9400
6
6
12G
✗
VM4
i5-9400
6
6
16G
✗
VM5
i5-9400
4
4
8G
✗
TABLE I: Evaluation Platform Configuration
Game Play
Office File Editing
Web Browsing
Audio Remix
Archive Extraction
S1
S8
S15
S22
Blender Render
S2
S9
S16
S23
Kernel Compile
S3
S10
S17
S24
LLM Generate
S4
S11
S18
S25
Disk I/O
S5
S12
S19
S26
Network Transfer
S6
S13
S20
S27
TABLE II: Benchmark Scenarios Matrix
Fig. 3: Discrepancy between throughput-oriented synthetic benchmark (Hackbench [ 36 ] ) and real-world application interactivity metrics. Our normalized composite score enables objective comparability across diverse multi-task scenarios. Scores are scaled by 104 for readability.
Fig. 4: Performance comparison between LAPS and EEVDF (scenarios × devices)
Fig. 5: Parallel coordinates plot showing average improvement ratios across different devices. LAPS demonstrates the ability to approach Pareto optimality by exploiting the diverse strengths of existing schedulers based on the underlying hardware.
Fig. 6: Performance comparison between LAPS and other reference schedulers. The heatmap illustrates that LAPS outperforms or matches static policies across diverse scenarios and devices.
Fig. 7: Geometric mean performance improvement
Fig. 8: Sensitivity of Time-Weighted Probability Voting to window length
Fig. 9: Cumulative Performance Improvement vs. Scheduler Set Size. The curve flattens as the set expands, indicating diminishing marginal benefit. However, the diverse set is essential to cover the long tail of workload patterns effectively.
Latency Type
Average
P95
P99
Max
Inference Latency
0.251
0.308
0.320
0.322
Decision Latency
0.038
0.050
0.053
0.054
Total Latency
0.289
0.357
0.367
0.369
TABLE III: LAPS Latency Statistics (values in milliseconds)
Figure 14Figure 15Figure 16Figure 17Figure 18
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Hyperparameter
Value
Hyperparameter
Value
n_estimators
2000
max_depth
9
colsample_bytree
0.52
subsample
0.80
learning_rate
0.22
gamma
0.12
min_child_weight
3.24
reg_alpha
0.06
early_stopping_rounds
50
reg_lambda
8.30
Appendix
TABLE IV: Optimal Hyperparameters for XGBoost Classifier
In recent years, the Internet of Things (IoT) paradigm has been shifting toward batteryless, energy-harvesting architectures. Sustaining reliable operation in these systems requires intelligent management of highly volatile stored energy. As edge applications grow in complexity, traditional energy-aware schedulers struggle with unpredictable workloads due to their reliance on static execution thresholds or pre-measured, hardware-specific task profiles. To overcome this, we propose two novel, hardware-agnostic dynamic scheduling strategies treating applications as a "black box," requiring no prior energy information: a model-free Reinforcement Learning (RL) agent and an on-the-fly Approximated Prediction (AP) method. We evaluate these methods against an adaptive task rate approach (AsTAR) and optimized static thresholds using a custom-built, physically accurate simulation framework driven by real-world solar data and dynamic LoRa transmission profiles. Rather than claiming universal superiority, our analysis exposes the distinct operational trade-offs of each method: the AP approach delivers lightweight, near-oracle task throughput; the RL agent provides tunable survival-execution balancing; and AsTAR excels at execution pacing across long energy gaps. Finally, we demonstrate that while these advanced strategies provide critical resilience for severely constrained systems with small capacitors, devices with larger energy buffers can efficiently rely on simpler, less computationally expensive static policies.
Compound AI is a distributed intelligence approach that represents a unified system orchestrating specialized AI/ML models with engineered software components into AI workflows. Compound AI production deployments must satisfy accuracy, latency, and cost objectives under varying loads. However, many deployments operate on fixed infrastructure where horizontal scaling is not viable. Existing approaches optimize solely for accuracy and do not consider changes in workload conditions. We observe that compound AI systems can switch between configurations to fit infrastructure capacity, trading accuracy for latency based on current load. This requires discovering multiple Pareto-optimal configurations from a combinatorial search space and determining when to switch between them at runtime. We present Compass, a novel framework that enables dynamic configuration switching through offline optimization and online adaptation. Compass consists of three components: COMPASS-V algorithm for configuration discovery, Planner for switching policy derivation, and Elastico Controller for runtime adaptation. COMPASS-V discovers accuracy-feasible configurations using finite-difference guided search and a combination of hill-climbing and lateral expansion. Planner profiles these configurations on target hardware and derives switching policies using a queuing theory based model. Elastico monitors queue depth and switches configurations based on derived thresholds. Across two compound AI workflows, COMPASS-V achieves 100% recall while reducing configuration evaluations by 57.5% on average compared to exhaustive search, with efficiency gains reaching 95.3% at tight accuracy thresholds. Runtime adaptation achieves 90-98% SLO compliance under dynamic load patterns, improving SLO compliance by 71.6% over static high-accuracy baselines, while simultaneously improving accuracy by 3-5% over static fast baselines.
Inference serving systems must balance throughput and latency under bursty, heterogeneous workloads, yet the industry standard remains static batching policies that require manual tuning and cannot adapt to shifting traffic. We investigate whether reinforcement learning (RL) can learn adaptive batching and routing policies that outperform these heuristics, training REINFORCE and PPO agents on a discrete-event simulator validated against queuing theory and production traces (Azure Functions, BurstGPT). We formulate the problem as an MDP over queue state, request type and GPU availability, evaluating across standard Poisson traffic, extreme bursts, real-world traces and heterogeneous multi-GPU routing. Our central finding is a clear boundary condition for RL's value in systems problems. In single-GPU settings, a well-tuned static batching policy is already near-optimal under Poisson-like arrivals and RL offers only marginal gains (+0.1% to +1.0%). In multi-GPU heterogeneous routing, however, where fast and slow requests compete for shared resources, the agent discovers a workload-segregation policy that eliminates Head-of-Line blocking, yielding a 3.5x (348%) improvement over Round-Robin and a 48% improvement over the strongest heuristic baseline (Shortest-Queue), with 60% higher throughput and 25% lower latency while respecting SLA constraints. The policy generalizes to unseen bursty and real-world traffic despite training only on synthetic Poisson arrivals and an attention-augmented policy network converges roughly 20% faster than an MLP baseline. These results suggest RL's advantage over engineered heuristics concentrates in combinatorial, multi-resource decisions rather than single-resource temporal scheduling, a practical distinction for deciding where learned policies justify their engineering cost in production inference infrastructure.
Ruslan Sharifullin
Department of Computer Science Stanford University