HackerPapers

arXiv:1803.04432cs.DC

Memory Models for C/C++ Programmers

Manuel Pöter, Jesper Larsson Träff

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

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.

arXiv comments
Journal reference
DOI
Subjects
cs.DCDistributed, Parallel, and Cluster Computing

On Hacker News

Linked by 1 identifiable commenter in 1 comment across 1 thread, from Dec 2019 to Dec 2019. Found in 2 HN submissions from Mar 2018 to Dec 2023. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments1 thread

    • Here are some references about the C++ memory model, introduced in C++11: https://arxiv.org/pdf/1803.04432.pdf https://people.mpi-sws.org/~viktor/slides/2016-01-debug.pdf A language memory model is a mathematical specification on how the language semantics map to actual CPUs and…

      pjmlpView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.