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

弱内存模型形式化:介绍与综述

Weak Memory Model Formalisms: Introduction and Survey

School of Computing, Australian National University(澳大利亚国立大学计算机学院);Defence Science and Technology Group(国防科学与技术集团);School of Electrical Engineering and Computer Science, University of Queensland(昆士兰大学电气与计算机工程学院)

Roger C. Su, Robert J. Colvin

AI总结:

本文综述了弱内存模型形式化的领域,探讨了其规范、影响及工具,并概述了该领域的现状与未来方向。

摘要:

内存一致性模型定义了并发系统中对共享内存访问的顺序可能被观察到的顺序。此类模型是必要的,因为程序顺序不是执行顺序的可靠指示器,由于微架构特征或编译器转换。在并发编程本身已是一项具有挑战性的任务时,必须处理弱内存效应使得问题变得更加困难。因此,对弱内存模型的严格规范对于使该问题对安全性和安全性至关重要的低级软件开发人员来说是至关重要的。在本文中,我们综述了弱内存模型形式化的领域,包括其规范、对执行的影响以及用于推理代码的工具和推理系统。为了帮助讨论,我们还介绍了两种在文献中常见形式化表示风格(使用简化版的Intel x86作为示例):系统轨迹的逐步构建(操作语义);以及内存事件之间的关系(公理语义)。综述涵盖了导致可观察弱行为的一些长期硬件特性,描述了实践中和理论上的历史发展,概述了可计算性和复杂性结果,并概述了该领域的当前和未来方向。

英文摘要:

Memory consistency models define the order in which accesses to shared memory in a concurrent system may be observed to occur. Such models are a necessity since program order is not a reliable indicator of execution order, due to microarchitectural features or compiler transformations. Concurrent programming, already a challenging task, is thus made even harder when weak memory effects must be addressed. A rigorous specification of weak memory models is therefore essential to make this problem tractable for developers of safety- and security-critical, low-level software. In this paper we survey the field of formalisations of weak memory models, including their specification, their effects on execution, and tools and inference systems for reasoning about code. To assist the discussion we also provide an introduction to two styles of formal representation found commonly in the literature (using a much simplified version of Intel's x86 as the example): a step-by-step construction of traces of the system (operational semantics); and with respect to relations between memory events (axiomatic semantics). The survey covers some long-standing hardware features that lead to observable weak behaviours, a description of historical developments in practice and in theory, an overview of computability and complexity results, and outlines current and future directions in the field.

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

↑