Lune

OOPSLA2022Top-tier venue

Implementing and verifying release-acquire transactional memory in C11

Sadegh Dalvandi, Brijesh Dongol

Abstract

Transactional memory (TM) is an intensively studied synchronisation paradigm with many proposed implementations in software and hardware, and combinations thereof. However, TM under relaxed memory, e.g., C11 (the 2011 C/C++ standard) is still poorly understood, lacking rigorous foundations that support verifiable implementations. This paper addresses this gap by developing TMS2-ra, a relaxed operational TM specification. We integrate TMS2-ra with RC11 (the repaired C11 memory model that disallows load-buffering) to provide a formal semantics for TM libraries and their clients. We develop a logic, TARO, for verifying client programs that use TMS2-ra for synchronisation. We also show how TMS2-ra can be implemented by a C11 library, TML-ra, that uses relaxed and release-acquire atomics, yet guarantees the synchronisation properties required by TMS2-ra. We benchmark TML-ra and show that it outperforms its sequentially consistent counterpart in the STAMP benchmarks. Finally, we use a simulation-based verification technique to prove correctness of TML-ra. Our entire development is supported by the Isabelle/HOL proof assistant.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Making weak memory models fair cites Verifying observational robustness against a c11-style memory model
  • Making weak memory models fair cites Pomsets with preconditions: a simple model of relaxed memory
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on7

  1. Promising 2.0: global optimizations in relaxed memory concurrencySung-Hwan Lee, Minki Cho, Anton Podkopaev, Soham Chakraborty et al.PLDI 2020 · 48 citations
  2. Pomsets with preconditions: a simple model of relaxed memoryRadha Jagadeesan, Alan Jeffrey, James RielyOOPSLA 2020 · 28 citations
  3. C4: verified transactional objectsMohsen Lesani, Li-yao Xia, Anders Kaseorg, Christian J. Bell et al.OOPSLA 2022 · 27 citations
  4. Verifying observational robustness against a c11-style memory modelRoy David Margalit, Ori LahavPOPL 2021 · 22 citations
  5. Making weak memory models fairOri Lahav, Egor Namakonov, Jonas Oberhauser, Anton Podkopaev et al.OOPSLA 2021 · 21 citations

Related papers

  1. Compass: strong and compositional library specifications in relaxed memory separation logicHoang-Hai Dang, Jaehwang Jung, Jaemin Choi, Duc-Than Nguyen et al.PLDI 2022 · 19 citations
  2. Optimal Reads-From Consistency Checking for C11-Style Memory ModelsHünkar Can Tunç, Parosh Aziz Abdulla, Soham Chakraborty, Shankaranarayanan Krishna et al.PLDI 2023 · 12 citations
  3. Decidable verification under a causally consistent shared memoryOri Lahav, Udi BokerPLDI 2020 · 30 citations
  4. TASE: Reducing Latency of Symbolic Execution with Transactional MemoryAdam Humphries, Kartik Cating-Subramanian, Michael K. ReiterNDSS 2021
  5. Automated Robustness Verification of Concurrent Data Structure Libraries against Relaxed Memory ModelsKartik Nagar, Anmol Sahoo, Romit Roy Chowdhury, Suresh JagannathanOOPSLA 2024 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines