【24h】

Synchronising C/C++ and POWER

机译:同步C / C ++和电源

获取原文

摘要

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.
机译:共享内存并发依赖于同步基元:比较 - 交换,负载储备/商店条件(AKA LL / SC),语言级互斥级等。在顺序一致的设置中,甚至在X86和SPARC的TSO设置中,这些都有很好的语义。但在IBM电源,ARM或C / C ++的非常轻松的环境中,它仍然令人惊讶地毫不清楚程序员可以依赖的。本文研究了轻松的内存同步。在硬件方面,我们首次提供电力多处理器提供的负载储备/商店条件原语的明确语义特征,这是20年前推出的第一次;我们涵盖了与轻松的负载,商店,障碍和依赖性的互动。我们的模型虽然不被供应商正式批准,但通过广泛的测试验证,比较了对模型生成的Oracle的实际实施行为,以及与IBM员工进行详细讨论。我们相信武器语义是相似的。在软件方面,我们证明了C / C ++同步构造的建议编译方案,包括C / C ++ SpinLock互斥,围栏和读取修改写入操作,以及声音已经有更简单的原子操作从我们以前的工作中闻名;这是验证使用负载储备/存储条件相对于逼真语义的并发算法的第一步。我们还以自己的术语为C / C ++模型建立信心,修复了一些遗漏并有助于C标准委员会通过C ++ 11并发模型。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号