On Thin Air Reads: Towards an Event Structures Model of Relaxed Memory

07/18/2017
by   Alan Jeffrey, et al.
0

This is the first paper to propose a pure event structures model of relaxed memory. We propose confusion-free event structures over an alphabet with a justification relation as a model. Executions are modeled by justified configurations, where every read event has a justifying write event. Justification alone is too weak a criterion, since it allows cycles of the kind that result in so-called thin-air reads. Acyclic justification forbids such cycles, but also invalidates event reorderings that result from compiler optimizations and dynamic instruction scheduling. We propose a notion well-justification, based on a game-like model, which strikes a middle ground. We show that well-justified configurations satisfy the DRF theorem: in any data-race free program, all well-justified configurations are sequentially consistent. We also show that rely-guarantee reasoning is sound for well-justified configurations, but not for justified configurations. For example, well-justified configurations are type-safe. Well-justification allows many, but not all reorderings performed by relaxed memory. In particular, it fails to validate the commutation of independent reads. We discuss variations that may address these shortcomings.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/15/2019

Reconciling Event Structures with Modern Multiprocessors

Weakestmo is a recently proposed memory consistency model that uses even...
research
12/08/2018

PrideMM: A Solver for Relaxed Memory Models

Relaxed memory models are notoriously delicate. To ease their study, sev...
research
11/29/2022

Reasoning about Promises in Weak Memory Models with Event Structures (Extended Version)

Modern processors such as ARMv8 and RISC-V allow executions in which ind...
research
05/11/2020

What Can Be Done with Consensus Number One: Relaxed Queues and Stacks

Sequentially specified linearizable concurrent data structures must be r...
research
05/11/2018

Enabling Cross-Event Optimization in Discrete-Event Simulation Through Compile-Time Event Batching

A discrete-event simulation (DES) involves the execution of a sequence o...
research
05/10/2019

Dynamic Verification with Observational Equivalence of C/C++ Concurrency

Program executions under relaxed memory model (rmm) semantics are signif...
research
02/16/2018

Compositional Verification of Compiler Optimisations on Relaxed Memory

A valid compiler optimisation transforms a block in a program without in...

Please sign up or login with your details

Forgot password? Click here to reset