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.
翻译:交易内存(TM)是一种经过深入研究的同步模式,它与软件和硬件及其组合中的许多拟议实施软件和硬件同步。然而,在放松记忆下,例如C11(2011 C/C++标准),TM仍然不甚为人理解,缺乏支持可核查执行的严格基础。本文件通过开发TMS2-RA(一个放松操作的TM规格)来弥补这一差距。我们把TM2-RA(TMS2-RA(一个已修复的C11内存模型,不允许负载缓冲)与RC11(C11内存模型)结合,为TM图书馆及其客户提供一个正式的语义。我们开发了一个逻辑,即TARO(一个逻辑,用于核查客户程序,使用TMS2-RA(TMS2-RA)同步。我们还展示了C11图书馆(TML-RA)如何实施TMS2-RA(TML-RA),该图书馆使用宽松和释放原子,但保证TMS2-RA(释放原子)所要求的同步性特性。我们将TML-RA(TML-RA)作为基准基准,显示它比STAMP基准中顺序一致的对应方。最后,我们使用模拟核查技术来证明TML/IL(AL)的验证技术助理支持整个发展。我们得到支持。