Principles of Transactional Memory

Book description


Transactional memory (TM) is an appealing paradigm for concurrent programming on shared memory architectures. With a TM, threads of an application communicate, and synchronize their actions, via in-memory transactions. Each transaction can perform any number of operations on shared data, and then either commit or abort. When the transaction commits, the effects of all its operations become immediately visible to other transactions; when it aborts, however, those effects are entirely discarded. Transactions are atomic: programmers get the illusion that every transaction executes all its operations instantaneously, at some single and unique point in time. Yet, a TM runs transactions concurrently to leverage the parallelism offered by modern processors. The aim of this book is to provide theoretical foundations for transactional memory. This includes defining a model of a TM, as well as answering precisely when a TM implementation is correct, what kind of properties it can ensure, what are the power and limitations of a TM, and what inherent trade-offs are involved in designing a TM algorithm. While the focus of this book is on the fundamental principles, its goal is to capture the common intuition behind the semantics of TMs and the properties of existing TM implementations.

Table of Contents: Introduction / Shared Memory Systems / Transactional Memory: A Primer / TM Correctness Issues / Implementing a TM / Further Reading / Opacity / Proving Opacity: An Example / Opacity vs.\ Atomicity / Further Reading / The Liveness of a TM / Lock-Based TMs / Obstruction-Free TMs / General Liveness of TMs / Further Reading / Conclusions

Table of contents

  1. Acknowledgments
  2. Introduction
    1. Problems with Explicit Locking
    2. Transactional Memory
    3. Scope of this Book
    4. Contents
  3. Basics
    1. Shared Memory Systems
      1. Basic Abstractions
        1. Processes and Shared Objects
        2. Shared Object Implementations
        3. Executions of Concurrent Algorithms
        4. Histories
        5. Semantics of Base Objects
        6. Configurations and Indistinguishability
        7. Asynchrony and Wait-Freedom
        8. Computability Questions
      2. Summary of Notation
    2. Transactional Memory: A Primer
      1. TM Shared Object
        1. Transactions
        2. T-Objects and their Semantics
      2. TM Histories
        1. Status of Transactions
        2. Real-Time Order
        3. Conflicts
        4. Restrictions
      3. High-Level TM API
      4. Discussion
        1. Nested Transactions
        2. Non-Transactional Access to T-Objects
        3. False Conflicts
        4. A Transaction Abstraction
      5. Summary of Notation
    3. TM Correctness Issues
      1. Atomicity of Committed Transactions
      2. Real-Time Order
      3. Precluding Inconsistent Views
    4. Implementing a TM
      1. General Idea
        1. (Read-Write) Try-Locks
        2. 2-Phase Locking TM Algorithm
      2. An Improved TM Algorithm
      3. Alternative Implementation Techniques
        1. Obstruction-Free Mechanisms
        2. Validation Heuristics
        3. Contention Management
        4. Multi-Version Schemes
        5. Deferred Updates
    5. Further Reading
      1. Shared Memory Systems
      2. Transactional Memory
  4. Safety
    1. Opacity
      1. Opacity Step by Step
      2. Definition of Opacity
      3. Examples
    2. Proving Opacity: An Example
      1. Preliminaries
      2. A Graph Characterization of Opacity
      3. 2-Phase Locking TM
      4. TM with Invisible Reads (1/2)
      5. TM with Invisible Reads (2/2)
    3. Opacity vs. Atomicity
      1. Properties of TM Implementations
      2. Complexity Lower Bound
      3. Circumventing the Lower Bound
    4. Further Reading
      1. The Roots of Opacity
      2. Alternatives and Extensions of Opacity
  5. Progress
    1. The Liveness of a TM
    2. Lock-Based TMs
      1. Strong Progressiveness
      2. Verifying Strong Progressiveness (1/2)
      3. Verifying Strong Progressiveness (2/2)
        1. Strong Try-Locks
        2. Reduction Theorem
        3. Examples
      4. The Computational Power of a Lock-Based TM
        1. Equivalence Between Lock-Based TMs and Try-Locks
        2. The Computational Power of a Strong Try-Lock
      5. Weakening Strong Progressiveness
    3. Obstruction-Free TMs
      1. Obstruction-Freedom
      2. Implementing an OFTM
      3. The Computational Power of an OFTM (1/3)
      4. The Computational Power of an OFTM (2/3)
      5. The Computational Power of an OFTM (3/3)
        1. Definition of an Fo-Consensus Object
        2. Implementing an OFTM from Fo-Consensus Objects
        3. Equivalence between OFTMs and Fo-Consensus Objects
        4. The Power of an Fo-Consensus Object
      6. Impossibility of Strict Disjoint-Access-Parallelism
      7. Alternative Forms of Obstruction-Freedom
    4. General Liveness of TMs
      1. High-Level Liveness of a TM (1/2)
      2. High-Level Liveness of a TM (2/2)
        1. Preliminaries
        2. Definition of (High-Level) TM Liveness
        3. Examples of TM Liveness Properties
        4. Classes of TM Liveness Properties
      3. Impossibility Result
      4. Ensuring Non-(N-1)-Prioritizing TM Liveness Properties
      5. Summary and Discussion
    5. Further Reading
    6. Conclusions
  6. Bibliography (1/2)
  7. Bibliography (2/2)
  8. Authors' Biographies

Product information

  • Title: Principles of Transactional Memory
  • Author(s): Rachid Guerraoui, Michael Kapalka
  • Release date: April 2010
  • Publisher(s): Morgan & Claypool Publishers
  • ISBN: 9781608450121