arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1710.04259cs.PL
收藏

具有匹配公理和操作定义的弱记忆模型

Weak Memory Models with Matching Axiomatic and Operational Definitions

Sizhuo Zhang, Muralidaran Vijayaraghavan, Dan Lustig, Arvind

摘要:

内存一致性模型因难以精确定义、推理和验证而臭名昭著。十多年的努力已经确定了ARM和IBM Power内存模型的定义,但这些模型的某些方面(也许令人惊讶)至今仍未解决。为了应对这些复杂性,(通用)架构社区最近有一种趋势,将新的内存模型限制为(多副本)原子:其中存储值可以在被通告给其他处理器之前由发布处理器读取。TSO是最著名的例子,过去被IBM 370和SPARC-TSO使用,目前用于x86。最近(2017年3月)ARM也转向了多拷贝原子内存模型,新的RISC-V ISA和最近的学术提案(如WMM)也在推动这样做。在本文中,我们表明,当内存模型是原子的,它变得更容易产生公理化的定义,操作定义,并证明等价性比做同样的非原子模型。这些定义的产生越来越容易,这反过来又使架构师能够更自信地构建处理器,而我们提出的模型的宽松性质仍然允许保留非原子模型的大部分或全部性能。事实上,在本文中,我们表明,原子内存模型可以定义的方式,是参数化的基本指令和围栏排序。我们的操作与公理等价证明,同样是参数化的,表明操作模型相对于公理是合理的,并且操作模型是完整的:它可以显示公理模型允许的任何行为。

英文摘要:

Memory consistency models are notorious for being difficult to define precisely, to reason about, and to verify. More than a decade of effort has gone into nailing down the definitions of the ARM and IBM Power memory models, and yet there still remain aspects of those models which (perhaps surprisingly) remain unresolved to this day. In response to these complexities, there has been somewhat of a recent trend in the (general-purpose) architecture community to limit new memory models to being (multicopy) atomic: where store values can be read by the issuing processor before being advertised to other processors. TSO is the most notable example, used in the past by IBM 370 and SPARC-TSO, and currently used in x86. Recently (in March 2017) ARM has also switched to a multicopy atomic memory model, and the new RISC-V ISA and recent academic proposals such as WMM are pushing to do the same. In this paper, we show that when memory models are atomic, it becomes much easier to produce axiomatic definitions, operational definitions, and proofs of equivalence than doing the same under non-atomic models. The increased ease with which these definitions can be produced in turn allows architects to build processors much more confidently, and yet the relaxed nature of the models we propose still allows most or all of the performance of non-atomic models to be retained. In fact, in this paper, we show that atomic memory models can be defined in a way that is parametrized by basic instruction and fence orderings. Our operational vs. axiomatic equivalence proofs, which are likewise parameterized, show that the operational model is sound with respect to the axioms and that the operational model is complete: that it can show any behavior permitted by axiomatic model.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑