paperbot · PL 论文追踪

全部论文 待读 收藏

P2 OOM-Guard: Towards Improving the Ergonomics of Rust OOM Handling via a Reservation-Based Approach

OOM-Guard:通过基于预留的方法改善 Rust OOM 处理的易用性
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 2/10 · 论文属于 Rust 内存管理/系统编程方向,虽使用静态分析与抽象解释,但并未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心交叉方向,与画像主线关联较弱。引用 4 inbox
Chengjun Chen, Zhicong Zhang, Hongliang Tian, Shoumeng Yan, Hui Xu
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 OOM-Guard,一种基于预留的 Rust OOM 处理方案,将多次分配失败处理转化为少量预留处理,降低开发负担且开销微小。

论文关注 Rust 中的内存耗尽(OOM)处理问题。Rust 强调内存安全,但默认采用 infallible 分配,OOM 时直接 abort,易导致服务或操作系统模块的健壮性缺陷,且现有防护依赖程序员手工处理。作者提出 OOM-Guard:一种基于预留(reservation)的方法,将大量可能失败的分配处理转化为对少量预留的处理。为实现高效预留,OOM-Guard 结合基于静态分析的成本分析算法与 proxy allocator。作者将 OOM-Guard 应用于 Bento 和 rCore 两个知名 Rust 项目,结果表明其能显著减少开发者处理 OOM 的负担,并在内存空间和执行时间上仅带来微小开销。

问题
Rust 默认不失败的内存分配在 OOM 时会使进程直接 abort,现有 OOM 防护依赖手工努力,难以保证服务或操作系统模块的健壮性。
方法
提出基于预留的 OOM 处理方法,将许多可能失败的分配转换为少量预留,并用静态分析成本算法和 proxy allocator 实现高效预留。
评估
在 Bento 和 rCore 上应用 OOM-Guard,评估开发者处理 OOM 的工作量以及内存与执行时间开销,结果显示大幅减负且开销微小。
原文摘要(Abstract)

Out of memory (OOM) is an exceptional system state where any further memory allocation requests may fail. Such allocation failures would crash the process or system if not handled properly, and they may also lead to an inconsistent program state that cannot be recovered easily. Current mechanisms for preventing such hazards highly rely on the manual effort of the programmers themselves. This paper studies the OOM issues of Rust, which is an emerging system programming language that stresses the importance of memory safety but still lacks handy mechanisms to handle OOM well. Even worse, Rust employs an infallible mode of memory allocations by default. As a result, the program written by Rust would simply abort itself when OOM occurs. Such crashes would lead to critical robustness issues for services or modules of operating systems. We propose OOM-Guard, a handy approach for Rust programmers to handle OOM. OOM-Guard is by nature a reservation-based approach that aims to convert the handlings for many possible failed memory allocations into handlings for a smaller number of reservations. In order to achieve efficient reservation, OOM-Guard incorporates a subtle cost analysis algorithm based on static analysis and a proxy allocator. We then apply OOM-Guard to two well-known Rust projects, Bento and rCore. Results show that OOM-Guard can largely reduce developers' efforts for handling OOM and incurs trivial overhead in both memory space and execution time.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{ChenZTY023,
  title = {OOM-Guard: Towards Improving the Ergonomics of Rust OOM Handling via a Reservation-Based Approach},
  author = {Chengjun Chen and Zhicong Zhang and Hongliang Tian and Shoumeng Yan and Hui Xu},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616303}
}