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

11/15/2019

Reconciling Event Structures with Modern Multiprocessors

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

PrideMM: A Solver for Relaxed Memory Models

Relaxed memory models are notoriously delicate. To ease their study, sev...
05/11/2020

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

Sequentially specified linearizable concurrent data structures must be r...
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...
02/11/2018

Event Structures for Petri nets with Persistence

Event structures are a widely accepted model of concurrency. In a semina...
02/16/2018

Compositional Verification of Compiler Optimisations on Relaxed Memory

A valid compiler optimisation transforms a block in a program without in...
07/19/2017

Weak Memory Models: Balancing Definitional Simplicity and Implementation Flexibility

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