arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1803.04432cs.DC
收藏

C/C ++程控仪的内存模型

Memory Models for C/C++ Programmers

Manuel Pöter, Jesper Larsson Träff

摘要:

内存模型是共享内存系统并发语义的关键。它定义了对于并发程序执行的任何给定的写操作集,允许读操作返回的可能值,从而定义了共享变量的基本语义。因此,如果没有明确的内存模型,就不可能对程序或程序设计语言实现的任何部分进行有意义的推理。本文简要介绍了内存模型的主题,解释了为什么它对并发程序至关重要,并涵盖了从顺序一致性到x86和ARM/POWER CPU的众所周知的内存模型。第4节完全致力于C++11内存模型,解释如何使用它来编写并发代码,这些代码不仅正确和可移植,而且通过利用现代体系结构的宽松内存模型来提高效率。

英文摘要:

The memory model is the crux of the concurrency semantics of shared-memory systems. It defines the possible values that a read operation is allowed to return for any given set of write operations performed by a concurrent program, thereby defining the basic semantics of shared variables. It is therefore impossible to meaningfully reason about a program or any part of the programming language implementation without an unambiguous memory model. This note provides a brief introduction into the topic of memory models, explaining why it is essential for concurrent programs and covering well known memory models from sequential consistency to those of the x86 and ARM/POWER CPUs. Section 4 is fully dedicated to the C++11 memory model, explaining how it can be used to write concurrent code that is not only correct and portable, but also efficient by utilizing the relaxed memory models of modern architectures.

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

↑