paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SOFRITAS

SOFRITAS:可串行化的无顺序区域,可扩展地提升线程原子性
ASPLOS Proceedings of the Twenty-Third International Conference on Architectural Support for Programming Languages and Operating Systems2018匹配度 1/10 · 该论文属于并发内存模型与动态并发错误检测方向,提出 OFR 可串行化一致性模型及工具 SOFRITEST/SOPRO,与用户画像中 PL→AI 静态分析、AI→PL 形式化验证、浮点程序分析或贝叶斯程序分析及其与 LLM 的交叉均无直接关联。引用 6 inbox
Christian DeLozier, Ariel Eizenberg, Brandon Lucia, Joseph Devietti
crossref: 2026-09-12

AI 速览

一句话:提出无顺序区域(OFR)可串行化一致性模型,并实现默认保证 OFR 原子性的并发错误检测工具 SOFRITEST 与运行时系统 SOPRO。

多线程程序的正确同步十分困难,原子性违反等同步错误会导致程序失败。已有的强内存一致性模型虽能排除部分失败,却依赖程序员自行编写的加锁代码。本文提出新的无顺序区域(Ordering-Free Region, OFR)可串行化一致性模型:OFR 指两次相邻定序构造(如 barrier)之间的动态指令区间,该模型保证 OFR 的原子性,同时不破坏锁操作处的原子性。作者实现了 SOFRITAS 平台,使 C/C++ 程序默认执行结果等价于 OFR 的某种串行化,并据此构建两套系统:面向测试的并发错误发现工具 SOFRITEST(在 OFR 粒度过粗时能自动建议细化注解)与生产级纯软件运行时系统 SOPRO。SOFRITEST 在 memcached 中发现了较弱一致性模型会漏掉的多临界区原子性违反;SOPRO 性能高、可随并行度良好扩展,即使加锁代码存在错误也能避免失败。在远弱于该模型语义的 pthreads 内存模型下,SOFRITAS 的平均开销仅为单线程 1.59 倍、十六线程 1.51 倍。

问题
多线程程序中锁代码本身的错误会导致原子性违反等失败,而现有强内存一致性模型把正确性寄托于程序员定义的加锁代码,因而无法覆盖这些失败。
方法
提出 OFR 可串行化一致性模型,以相邻定序构造之间的动态指令区间为原子单元,并实现默认保证 C/C++ 程序执行等价于 OFR 串行化的 SOFRITAS 平台,包括错误检测工具 SOFRITEST 与纯软件运行时 SOPRO(支持自动建议 OFR 细化注解)。
评估
用 SOFRITEST 在真实程序 memcached 中发现多临界区原子性违反,并与较弱一致性模型对比;在单线程与十六线程下测量 SOPRO 的开销与可扩展性(平均 1.59x 与 1.51x),并考察其在锁代码有错时防止失败的能力。
原文摘要(Abstract)

Correctly synchronizing multithreaded programs is challenging and errors can lead to program failures such as atomicity violations. Existing strong memory consistency models rule out some possible failures, but are limited by depending on programmer-defined locking code. We present the new Ordering-Free Region (OFR) serializability consistency model that ensures atomicity for OFRs, which are spans of dynamic instructions between consecutive ordering constructs (e.g., barriers), without breaking atomicity at lock operations. Our platform, Serializable Ordering-Free Regions for Increasing Thread Atomicity Scalably (SOFRITAS), ensures a C/C++ program's execution is equivalent to a serialization of OFRs by default. We build two systems that realize the SOFRITAS idea: a concurrency bug finding tool for testing called SOFRITEST, and a production runtime system called SOPRO. SOFRITEST uses OFRs to find concurrency bugs, including a multi-critical-section atomicity violation in memcached that weaker consistency models will miss. If OFR's are too coarse-grained, SOFRITEST suggests refinement annotations automatically. Our software-only SOPRO implementation has high performance, scales well with increased parallelism, and prevents failures despite bugs in locking code. SOFRITAS has an average overhead of just 1.59x on a single-threaded execution and 1.51x on sixteen threads, despite pthreads' much weaker memory model.

链接与引用

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

BibTeX
@inproceedings{paperbot4299,
  title = {SOFRITAS},
  author = {Christian DeLozier and Ariel Eizenberg and Brandon Lucia and Joseph Devietti},
  booktitle = {ASPLOS},
  year = {2018},
  doi = {10.1145/3173162.3173192}
}