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

弱内存模型:平衡概念简单性和实现灵活性

Weak Memory Models: Balancing Definitional Simplicity and Implementation Flexibility

Sizhuo Zhang, Muralidaran Vijayaraghavan, Arvind

摘要:

RISC-V是一种新开发的开源ISA,其内存模型尚未最终确定,因此提供了评估现有内存模型的机会。我们认为RISC-V不应该采用POWER或ARM的内存模型,因为它们的公理和操作定义太复杂。我们提出了两个新的弱记忆模型:WMM和WMM-S,这两个模型平衡了定义的简单性和实现的灵活性。两者都允许所有的指令重新排序,除了由存储超越加载。我们表明,这种限制对性能的影响很小,它大大简化了操作定义。它还排除了困扰许多定义的凭空出现的问题。WMM很简单(它类似于Alpha内存模型),但它不允许由于共享存储缓冲区和共享直写缓存(在POWER处理器中可见)而产生的行为。另一方面,WMM-S更复杂,允许这些行为。我们使用瞬时指令执行(I2 E),这已被用于SC和TSO的定义中给出了这两个模型的操作定义。我们还展示了如何使用传统的高速缓存一致的内存系统和无序处理器,这两个模型可以实现,并涵盖了最知名的优化行为。

英文摘要:

The memory model for RISC-V, a newly developed open source ISA, has not been finalized yet and thus, offers an opportunity to evaluate existing memory models. We believe RISC-V should not adopt the memory models of POWER or ARM, because their axiomatic and operational definitions are too complicated. We propose two new weak memory models: WMM and WMM-S, which balance definitional simplicity and implementation flexibility differently. Both allow all instruction reorderings except overtaking of loads by a store. We show that this restriction has little impact on performance and it considerably simplifies operational definitions. It also rules out the out-of-thin-air problem that plagues many definitions. WMM is simple (it is similar to the Alpha memory model), but it disallows behaviors arising due to shared store buffers and shared write-through caches (which are seen in POWER processors). WMM-S, on the other hand, is more complex and allows these behaviors. We give the operational definitions of both models using Instantaneous Instruction Execution (I2E), which has been used in the definitions of SC and TSO. We also show how both models can be implemented using conventional cache-coherent memory systems and out-of-order processors, and encompasses the behaviors of most known optimizations.

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

↑