构建弱记忆模型
Constructing a Weak Memory Model
摘要:
弱内存模型是架构师希望在构建共享内存多处理器时保留所有单处理器优化的结果。在过去的几十年里,对ARM和POWER的弱记忆模型进行形式化的努力大多是经验性的--他们试图捕捉经验观察到的行为--最终没有提供对弱记忆模型内在本质的洞察。本文采取了建设性的方法来找到一个共同的基础弱内存模型:我们探讨什么是弱内存会像如果我们构建它的明确目标是保留所有的单处理器优化。我们将不允许一些优化,这打破了程序员的直觉,在高度意想不到的方式。所构建的模型,我们称之为通用原子内存模型(GAM),允许所有四个加载/存储重新排序。我们给出了GAM的构造过程,并提供了用于定义其操作语义和公理语义的见解。虽然没有尝试GAM匹配任何现有的弱记忆模型,我们通过模拟表明,GAM具有可比的性能与其他模型。阅读本文不需要深入了解内存模型。
英文摘要:
Weak memory models are a consequence of the desire on part of architects to preserve all the uniprocessor optimizations while building a shared memory multiprocessor. The efforts to formalize weak memory models of ARM and POWER over the last decades are mostly empirical -- they try to capture empirically observed behaviors -- and end up providing no insight into the inherent nature of weak memory models. This paper takes a constructive approach to find a common base for weak memory models: we explore what a weak memory would look like if we constructed it with the explicit goal of preserving all the uniprocessor optimizations. We will disallow some optimizations which break a programmer's intuition in highly unexpected ways. The constructed model, which we call General Atomic Memory Model (GAM), allows all four load/store reorderings. We give the construction procedure of GAM, and provide insights which are used to define its operational and axiomatic semantics. Though no attempt is made to match GAM to any existing weak memory model, we show by simulation that GAM has comparable performance with other models. No deep knowledge of memory models is needed to read this paper.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。