paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Responsive Parallelism with Synchronization

带同步的响应式并行
PLDI 7(PLDI)2023匹配度 2/10 · 论文属于并发程序语言与类型系统方向,研究互斥锁/条件变量中的优先级反转防治,与画像关注的 AI/LLM 交叉、浮点程序分析、贝叶斯程序分析等核心方向无直接关联。虽然包含静态分析与工程落地案例,但未涉及机器学习系统、Agentic 程序或 LLM 辅助分析。引用 3 inbox
Stefan K. Muller, Kyle Singer, Devyn Terra Keeney, Andrew Neth, Kunal Agrawal, I-Ting Angelina Lee, Umut A. Acar
crossref: 2026-09-10

AI 速览

一句话:通过类型系统与动态优先级调整,防止互斥锁和条件变量使用中的优先级反转,实现响应式并行。

许多并发程序通过给线程分配优先级来提升响应性,但在与互斥锁、条件变量等同步机制结合时,高优先级线程可能被低优先级线程阻塞,产生优先级反转。互斥锁的优先级反转可用优先级继承等动态技术处理,条件变量上的优先级反转则研究不足且动态技术不适用。本文结合静态与动态技术,防止同时使用互斥锁和条件变量时的优先级反转:类型系统保证条件变量的安全使用,而运行时动态调整线程优先级以消除互斥锁中的优先级反转。作者基于并行程序代价模型建立优先级反转模型,证明了类型系统的可靠性,并将其编码进 Rust 和 C++ 类型系统。通过较大规模案例研究,包括将 Memcached 对象服务器移植到 C++ 实现,表明约束并不过于繁重。

问题
并发程序使用线程优先级提高响应性时,与互斥锁和条件变量同步会引发优先级反转,高优先级线程被低优先级线程延迟;其中条件变量上的优先级反转缺乏研究且难以用动态方法解决。
方法
结合静态与动态技术:类型系统保证条件变量的安全使用,运行时动态调整线程优先级以消除互斥锁导致的优先级反转;并基于并行程序代价模型证明系统可靠性。
评估
将类型系统编码到 Rust 和 C++ 类型系统中,通过较大规模案例研究(包括将 Memcached 对象服务器移植到 C++ 实现)评估可用性与约束负担。
原文摘要(Abstract)

Many concurrent programs assign priorities to threads to improve responsiveness. When used in conjunction with synchronization mechanisms such as mutexes and condition variables, however, priorities can lead to priority inversions, in which high-priority threads are delayed by low-priority ones. Priority inversions in the use of mutexes are easily handled using dynamic techniques such as priority inheritance, but priority inversions in the use of condition variables are not well-studied and dynamic techniques are not suitable. In this work, we use a combination of static and dynamic techniques to prevent priority inversion in code that uses mutexes and condition variables. A type system ensures that condition variables are used safely, even while dynamic techniques change thread priorities at runtime to eliminate priority inversions in the use of mutexes. We prove the soundness of our system, using a model of priority inversions based on cost models for parallel programs. To show that the type system is practical to implement, we encode it within the type systems of Rust and C++, and show that the restrictions are not overly burdensome by writing sizeable case studies using these encodings, including porting the Memcached object server to use our C++ implementation.

链接与引用

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

BibTeX
@article{paperbot1992,
  title = {Responsive Parallelism with Synchronization},
  author = {Stefan K. Muller and Kyle Singer and Devyn Terra Keeney and Andrew Neth and Kunal Agrawal and I-Ting Angelina Lee and Umut A. Acar},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {PLDI},
  year = {2023},
  doi = {10.1145/3591249}
}