NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

SARA: A Stall-Aware Memory Allocation Strategy for Mixed-Criticality Systems

Meng-Chia Lee, Wen Sheng Lim, Yuan-Hao Chang, Tei-Wei Kuo

TL;DR

SARA (Stall-Aware Real-Time Memory Allocator) is a novel memory management strategy for edge devices that balances the competing needs of soft real-time tasks and high-throughput applications. By leveraging Linux's Pressure Stall Information (PSI) to dynamically allocate "just enough" memory and proactively dropping jobs hit by unpredictable system-level stalls, SARA achieves a ~97% deadline hit ratio while boosting background application throughput by up to 22x.

What Problem Does This Paper Address?

Edge AI devices are often caught in a "resource squeeze." They have limited RAM due to cost and power constraints, yet they must run a mix of applications: soft real-time (RT) tasks (like voice recognition or gesture control) that require low latency, and non-real-time (non-RT) tasks (like data logging or graph processing) that require high throughput.

When memory runs low, the Linux kernel starts "swapping" pages to storage (SSDs). This process is orders of magnitude slower than RAM access, leading to performance degradation. Existing solutions often fail here:

  1. Greedy approaches over-allocate memory to RT tasks to ensure they meet deadlines, which starves non-RT tasks and kills throughput.
  2. Static profiling fails to account for runtime "jitter" or hardware variations (e.g., a slow vs. a fast SSD).
  3. System-level "long stalls": The authors observed unpredictable, severe stalls that cause cascading deadline misses. Current allocators don't have a mechanism to detect or mitigate these transient system-wide collapses.
The impact of memory allocation on execution time across different storage speeds.

Methods

SARA introduces a two-pronged approach implemented using Linux cgroups v2:

  • PSI-based Dynamic Allocation: SARA uses a new metric, $s_{intv}$, derived from Linux’s Pressure Stall Information. It measures the maximum stall time caused by memory and I/O scarcity within a millisecond-scale interval. By observing that execution time is roughly the sum of the best-case execution time and the total stall time, SARA calculates an "ideal stall time" for each job. It then dynamically adjusts the memory limit to ensure the job finishes just before its deadline, leaving the maximum possible RAM for non-RT tasks.
  • Stall-Aware Early Job Dropping: To handle "long stalls," SARA monitors the frequency of severe stalls. If a job encounters too many high-magnitude stalls early on, SARA identifies it as "doomed" to miss its deadline. Instead of letting it struggle and cause "cascading delays" for future jobs, SARA proactively drops the job, freeing up resources immediately.
The SARA system architecture, showing the monitor and detector components.

Datasets

The researchers evaluated SARA on a real-world system (Intel i7-13700) using representative edge AI workloads:

  • Sphinx: A speech recognition application (high memory usage).
  • OpenCV: An image classification application (low memory usage).
  • Graphchi: A memory-intensive non-RT workload used to process large graphs.

Testing was performed across "small-memory" (60% of peak demand) and "large-memory" (80%) configurations, using both slow and fast SSDs as swap backends.

Key Insights and Ideas

  • The Linear Relationship: A key "aha moment" was confirming that execution time correlates linearly with stall time ($t_{exec} \approx s_{period} + t_{BCET}$). This makes it mathematically feasible to tune memory limits dynamically to hit a specific deadline.
  • PSI as a Universal Translator: Unlike metrics like "page swap-in rate," PSI reflects the actual latency impact on the process, regardless of whether the underlying storage is a slow HDD or a blazing-fast NVMe drive.
  • The "Long Stall" Phenomenon: The authors identified that memory-constrained systems don't just slow down gracefully; they experience unpredictable "long stalls" that suspend all user-level processes.
  • Strategic Surrender: In real-time systems, it is often better to drop a single job that is guaranteed to fail than to let it delay the entire pipeline. SARA’s proactive dropping prevents one "long stall" from ruining the deadline hit ratio for the next several minutes of operation.
Visualizing how "long stalls" cause cascading delays and deadline misses.

Key Results

  • Reliability: SARA maintained an average 97.13% deadline hit ratio for soft RT tasks, even when memory was limited to 60% of peak demand.
  • Efficiency: Compared to "Greedy" and "TMO-Low" (standard Linux pressure-based) strategies, SARA improved non-RT throughput by up to 22.32x in small-memory, fast-SSD scenarios.
  • Hardware Agnostic: SARA successfully balanced performance on both slow and fast SSDs, whereas previous state-of-the-art methods (like TMO-High) suffered from high deadline miss rates (up to 50%+) on slower hardware.

Limitations and Future Work

  • Offline Profiling for Stalls: While the memory adjustment is dynamic, the specific thresholds for defining a "long stall" ($m$ and $n$ parameters) currently require a one-time offline profiling step for each workload.
  • CPU Stalls: The current model focuses almost exclusively on memory and I/O. While the authors argue CPU stalls are negligible in these specific memory-constrained edge cases, a truly holistic allocator might need to incorporate CPU pressure as well.
  • Hard Real-Time: SARA is designed for soft real-time systems. In mission-critical "hard" real-time environments (like automotive braking), dropping jobs is usually not an option, and stricter hardware isolation would be required.

Summary updated

BibTeX
@inproceedings{lee2026sara,
  author = {Meng-Chia Lee and Wen Sheng Lim and Yuan-Hao Chang and Tei-Wei Kuo},
  title = {{SARA: A Stall-Aware Memory Allocation Strategy for Mixed-Criticality Systems}},
  booktitle = {ASP-DAC},
  year = {2026},
  doi = {10.1109/asp-dac66049.2026.11420662},
}
Figure