Weak Memory Models: Balancing Definitional Simplicity and Implementation Flexibility

07/19/2017
by   Sizhuo Zhang, et al.
0

The memory model for RISC-V, a newly developed open source ISA, has not been finalized yet and thus, offers an opportunity to evaluate existing memory models. We believe RISC-V should not adopt the memory models of POWER or ARM, because their axiomatic and operational definitions are too complicated. We propose two new weak memory models: WMM and WMM-S, which balance definitional simplicity and implementation flexibility differently. Both allow all instruction reorderings except overtaking of loads by a store. We show that this restriction has little impact on performance and it considerably simplifies operational definitions. It also rules out the out-of-thin-air problem that plagues many definitions. WMM is simple (it is similar to the Alpha memory model), but it disallows behaviors arising due to shared store buffers and shared write-through caches (which are seen in POWER processors). WMM-S, on the other hand, is more complex and allows these behaviors. We give the operational definitions of both models using Instantaneous Instruction Execution (I2E), which has been used in the definitions of SC and TSO. We also show how both models can be implemented using conventional cache-coherent memory systems and out-of-order processors, and encompasses the behaviors of most known optimizations.

READ FULL TEXT
research
05/16/2017

An Operational Framework for Specifying Memory Models using Instantaneous Instruction Execution

There has been great progress recently in formally specifying the memory...
research
10/11/2017

Weak Memory Models with Matching Axiomatic and Operational Definitions

Memory consistency models are notorious for being difficult to define pr...
research
05/21/2018

Constructing a Weak Memory Model

Weak memory models are a consequence of the desire on part of architects...
research
06/24/2019

A formalisation of the SPARC TSO memory model for multi-core machine code

SPARC processors have many applications in mission-critical industries s...
research
06/17/2016

Taming Weak Memory Models

Speculative techniques in microarchitectures relax various dependencies ...
research
10/13/2017

The Semantics of Transactions and Weak Memory in x86, Power, ARM, and C++

Weak memory models provide a complex, system-centric semantics for concu...
research
12/31/2017

Deterministic Computations on a PRAM with Static Processor and Memory Faults

We consider Parallel Random Access Machine (PRAM) which has some process...

Please sign up or login with your details

Forgot password? Click here to reset