Memory Models for C/C++ Programmers

03/12/2018
by   Manuel Pöter, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/03/2019

An Efficient Approach to Achieve Compositionality using Optimized Multi-Version Object Based Transactional Systems

In the modern era of multi-core systems, the main aim is to utilize the ...
research
04/07/2022

Separation of concerning things: a simpler basis for defining and programming with the C/C++ memory model (extended version)

The C/C++ memory model provides an interface and execution model for pro...
research
03/01/2022

Relaxed virtual memory in Armv8-A (extended version)

Virtual memory is an essential mechanism for enforcing security boundari...
research
08/29/2018

Memory Consistency Models using Constraints

Memory consistency models (MCMs) are at the heart of concurrent programm...
research
09/04/2023

Productive Development of Scalable Network Functions with NFork

Despite decades of research, developing correct and scalable concurrent ...
research
06/01/2017

A Concurrency-Agnostic Protocol for Multi-Paradigm Concurrent Debugging Tools

Today's complex software systems combine high-level concurrency models. ...
research
05/14/2021

Linearizability: a Typo

Linearizability is the de facto consistency condition for concurrent obj...

Please sign up or login with your details

Forgot password? Click here to reset