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

by   Alan Jeffrey, et al.

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.


page 1

page 2

page 3

page 4


Reconciling Event Structures with Modern Multiprocessors

Weakestmo is a recently proposed memory consistency model that uses even...

PrideMM: A Solver for Relaxed Memory Models

Relaxed memory models are notoriously delicate. To ease their study, sev...

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

Sequentially specified linearizable concurrent data structures must be r...

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...

Event Structures for Petri nets with Persistence

Event structures are a widely accepted model of concurrency. In a semina...

Compositional Verification of Compiler Optimisations on Relaxed Memory

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

Weak Memory Models: Balancing Definitional Simplicity and Implementation Flexibility

The memory model for RISC-V, a newly developed open source ISA, has not ...