On the Semantics of Snapshot Isolation

05/16/2018
by   Azalea Raad, et al.
0

Snapshot isolation (SI) is a standard transactional consistency model used in databases, distributed systems and software transactional memory (STM). It is formally defined both declaratively as an acyclicity axiom, and operationally as a concurrent algorithm with memory bearing timestamps. In this paper, we develop two simpler equivalent operational definitions of SI as lock-based reference implementations that do not use timestamps. Our first locking implementation is prescient in that requires a priori knowledge of the data accessed by a transaction and carries out transactional writes eagerly (in-place). Our second implementation is non-prescient and performs transactional writes lazily by recording them in a local log and propagating them to memory at commit time. Whilst our first implementation is simpler and may be better suited for developing a program logic for SI transactions, our second implementation is more practical due to its non-prescience. We show that both implementations are sound and complete against the declarative SI specification and thus yield equivalent operational definitions for SI. We further consider, for the first time formally, the use of SI in a context with racy non-transactional accesses, as can arise in STM implementations of SI. We introduce robust snapshot isolation (RSI), an adaptation of SI with similar semantics and guarantees in this mixed setting. We present a declarative specification of RSI as an acyclicity axiom and analogously develop two operational models as lock-based reference implementations (one eager, one lazy). We show that these operational models are both sound and complete against the declarative RSI model.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/08/2021

From Matching Logic To Parallel Imperative Language Verification

Program verification is to develop the program's proof system, and to pr...
research
01/22/2021

Checking Robustness Between Weak Transactional Consistency Models

Concurrent accesses to databases are typically encapsulated in transacti...
research
09/04/2023

Deployment of Real-Time Network Traffic Analysis using GraphBLAS Hypersparse Matrices and D4M Associative Arrays

Matrix/array analysis of networks can provide significant insight into t...
research
10/26/2020

Taming x86-TSO Persistency (Extended Version)

We study the formal semantics of non-volatile memory in the x86-TSO arch...
research
05/15/2017

Operational Semantics of Process Monitors

CSPe is a specification language for runtime monitors that can directly ...
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
09/14/2021

Coo: Rethink Data Anomalies In Databases

Transaction processing technology has three important contents: data ano...

Please sign up or login with your details

Forgot password? Click here to reset