Synchronising C/C++ and POWER

Synchronising C/C++ and POWER
复制标题

同步 C/C 和 POWER

DOI:
10.1145/2254064.2254102
复制
发表时间:
2012
期刊:
--
影响因子:
--
通讯作者:
Sarkar S
Sarkar S
中科院分区:
--
文献类型:
--
作者:
Sarkar S

文献摘要

参考文献

被引文献

相似文献

共享内存并发依赖于同步原语:比较和交换,加载保留/存储条件(aka LL/SC),语言级互斥等。在顺序一致的设置中,甚至在x86和Sparc的TSO设置中,这些都有很好的语义。但在IBM®、POWER®、ARM或C/C++的非常宽松的环境中,程序员可以依赖的东西仍然令人惊讶地不清楚。在硬件方面,我们给出了一个明确的语义表征的负载储备/存储条件原语提供的POWER多处理器,第一次,因为它们是在20年前推出的,我们涵盖了他们的相互作用与宽松的负载,商店,障碍,和依赖关系。我们的模型虽然没有得到供应商的正式认可,但通过广泛的测试进行了验证,将实际实现行为与模型生成的oracle进行了比较,并与IBM员工进行了详细的讨论。我们相信ARM的语义是相似的。在软件方面,我们证明了一个建议的C/C++同步结构到POWER的编译方案,包括C/C++自旋锁互斥体,栅栏,读-修改-写操作,以及更简单的原子操作,其合理性已经从我们以前的工作中得知;这是验证相对于实际语义使用加载保留/存储条件的并发算法的第一步。我们还建立了对C/C++模型的信心,修复了一些遗漏,并为C标准委员会采用C++11并发模型做出了贡献。
Shared memory concurrency relies on synchronisation primitives: compare-and-swap, load-reserve/store-conditional (aka LL/SC), language-level mutexes, and so on. In a sequentially consistent setting, or even in the TSO setting of x86 and Sparc, these have well-understood semantics. But in the very relaxed settings of IBM®, POWER®, ARM, or C/C++, it remains surprisingly unclear exactly what the programmer can depend on.This paper studies relaxed-memory synchronisation. On the hardware side, we give a clear semantic characterisation of the load-reserve/store-conditional primitives as provided by POWER multiprocessors, for the first time since they were introduced 20 years ago; we cover their interaction with relaxed loads, stores, barriers, and dependencies. Our model, while not officially sanctioned by the vendor, is validated by extensive testing, comparing actual implementation behaviour against an oracle generated from the model, and by detailed discussion with IBM staff. We believe the ARM semantics to be similar.On the software side, we prove sound a proposed compilation scheme of the C/C++ synchronisation constructs to POWER, including C/C++ spinlock mutexes, fences, and read-modify-write operations, together with the simpler atomic operations for which soundness is already known from our previous work; this is a first step in verifying concurrent algorithms that use load-reserve/store-conditional with respect to a realistic semantics. We also build confidence in the C/C++ model in its own terms, fixing some omissions and contributing to the C standards committee adoption of the C++11 concurrency model.
非阻塞堆栈的模块化验证
DOI: 10.1145/1190216.1190261
发表时间: 2007
期刊: Parallel Process. Lett.
影响因子: --
作者:
Matthew J. Parkinson;R. Bornat;P. O'Hearn
通讯作者: P. O'Hearn
了解 POWER 多处理器
DOI: 10.1145/1993316.1993520
发表时间: 2011
影响因子: --
作者:
Sarkar S
通讯作者: Sarkar S
DOI: --
发表时间: 2006
期刊: --
影响因子: --
作者:
Iroon Polytechniou-
通讯作者: Iroon Polytechniou-