Concurrent Programming Algorithms, Principles, and Foundations

The advent of new architectures and computing platforms mean that synchronization and concurrent computing are among the most important topics in computing science. Concurrent programs are made up of cooperating entities -- processors, processes, agents, peers, sensors -- and synchronization is the...

Full description

Saved in:
Bibliographic Details
Main Author Raynal, Michel
Format eBook Book
LanguageEnglish
Published Netherlands Springer Nature 2012
Springer-Verlag
Springer
Springer Berlin Heidelberg
Edition1
Subjects
Online AccessGet full text
ISBN9783642320279
3642320279
9783642320262
3642320260
9783642446153
3642446159
DOI10.1007/978-3-642-32027-9

Cover

Table of Contents:
  • 9.5 Recursive Store-Collect-Based Size-Adaptive Implementation -- 9.5.1 A Recursive Renaming Algorithm -- 9.5.2 An Example -- 9.5.3 Proof of the Renaming Implementation -- 9.6 Variantof thePreviousRecursion-BasedRenamingAlgorithm -- 9.6.1 A Renaming Implementation Based on Immediate Snapshot Objects -- 9.6.2 An Example of a Renaming Execution -- 9.7 Long-Lived Perfect Renaming Based on Test&amp -- Set Registers -- 9.7.1 Perfect Adaptive Renaming -- 9.7.2 Perfect Long-Lived Test&amp -- Set-Based Renaming -- 9.8 Summary -- 9.9 Bibliographic Notes -- 9.10 Exercises and Problems -- Part IV The Transactional Memory Approach -- 10 Transactional Memory -- 10.1 What Are Software Transactional Memories -- 10.1.1 Transactions = High-Level Synchronization -- 10.1.2 At the Programming Level -- 10.2 STM System -- 10.2.1 Speculative Executions, Commit and Abort of a Transaction -- 10.2.2 An STM Consistency Condition: Opacity -- 10.2.3 An STM Interface -- 10.2.4 Incremental Reads and Deferred Updates -- 10.2.5 Read-Only Versus Update Transactions -- 10.2.6 Read Invisibility -- 10.3 A Logical Clock-Based STM System: TL2 -- 10.3.1 Underlying System and Control Variables of the STM System -- 10.3.2 Underlying Principle: Consistency with Respect to Transaction Birth Date -- 10.3.3 The Implementation of an Update Transaction -- 10.3.4 The Implementation of a Read-Only Transaction -- 10.4 A Version-Based STM System: JVSTM -- 10.4.1 Underlying and Control Variables of the STM System -- 10.4.2 The Implementation of an Update Transaction -- 10.4.3 The Implementation of a Read-Only Transaction -- 10.5 A Vector Clock-Based STM System -- 10.5.1 The Virtual World Consistency Condition -- 10.5.2 An STM System for Virtual World Consistency -- 10.5.3 The Algorithms Implementing the STM Operations -- 10.6 Summary -- 10.7 Bibliographic Notes -- 10.8 Exercises and Problems
  • 3.2.2 Using Semaphores to Solve the Producer-Consumer Problem -- 3.2.3 Using Semaphores to Solve a Priority Scheduling Problem -- 3.2.4 Using Semaphores to Solve the Readers-Writers Problem -- 3.2.5 Using a Buffer to Reduce Delays for Readers and Writers -- 3.3 A Construct for Imperative Languages: the Monitor -- 3.3.1 The Concept of a Monitor -- 3.3.2 A Rendezvous Monitor Object -- 3.3.3 Monitors and Predicates -- 3.3.4 Implementing a Monitor from Semaphores -- 3.3.5 Monitors for the Readers-Writers Problem -- 3.3.6 Scheduled Wait Operation -- 3.4 Declarative Synchronization: Path Expressions -- 3.4.1 Definition -- 3.4.2 Using Path Expressions to Solve Synchronization Problems -- 3.4.3 A Semaphore-Based Implementation of Path Expressions -- 3.5 Summary -- 3.6 Bibliographic Notes -- 3.7 Exercises and Problems -- Part II On the Foundations Side:The Atomicity Concept -- 4 Atomicity: Formal Definition and Properties -- 4.1 Introduction -- 4.2 Computation Model -- 4.2.1 Processes and Operations -- 4.2.2 Objects -- 4.2.3 Histories -- 4.2.4 Sequential History -- 4.3 Atomicity -- 4.3.1 Legal History -- 4.3.2 The Case of Complete Histories -- 4.3.3 The Case of Partial Histories -- 4.4 Object Composability and Guaranteed Termination Property -- 4.4.1 Atomic Objects Compose for Free -- 4.4.2 Guaranteed Termination -- 4.5 Alternatives to Atomicity -- 4.5.1 Sequential Consistency -- 4.5.2 Serializability -- 4.6 Summary -- 4.7 Bibliographic Notes -- Part III Mutex-Free Synchronization -- 5 Mutex-Free Concurrent Objects -- 5.1 Mutex-Freedom and Progress Conditions -- 5.1.1 The Mutex-Freedom Notion -- 5.1.2 Progress Conditions -- 5.1.3 Non-blocking with Respect to Wait-Freedom -- 5.2 Mutex-Free Concurrent Objects -- 5.2.1 The Splitter: A Simple Wait-Free Object from Read/Write Registers -- 5.2.2 A Simple Obstruction-Free Object from Read/Write Registers
  • Intro -- Concurrent Programming: Algorithms, Principles, and Foundations -- Preface -- Contents -- Notation -- Figures and Algorithms -- Part I Lock-Based Synchronization -- 1 The Mutual Exclusion Problem -- 1.1 Multiprocess Program -- 1.1.1 The Concept of a Sequential Process -- 1.1.2 The Concept of a Multiprocess Program -- 1.2 Process Synchronization -- 1.2.1 Processors and Processes -- 1.2.2 Synchronization -- 1.2.3 Synchronization: Competition -- 1.2.4 Synchronization: Cooperation -- 1.2.5 The Aim of Synchronization Is to Preserve Invariants -- 1.3 The Mutual Exclusion Problem -- 1.3.1 The Mutual Exclusion Problem (Mutex) -- 1.3.2 Lock Object -- 1.3.3 Three Families of Solutions -- 1.4 Summary -- 1.5 Bibliographic Notes -- 2 Solving Mutual Exclusion -- 2.1 Mutex Based on Atomic Read/Write Registers -- 2.1.1 Atomic Register -- 2.1.2 Mutex for Two Processes: An Incremental Construction -- 2.1.3 A Two-Process Algorithm -- 2.1.4 Mutex for n Processes: Generalizing the Previous Two-Process Algorithm -- 2.1.5 Mutex for n Processes: A Tournament-Based Algorithm -- 2.1.6 A Concurrency-Abortable Algorithm -- 2.1.7 A Fast Mutex Algorithm -- 2.1.8 Mutual Exclusion in a Synchronous System -- 2.2 Mutex Based on Specialized Hardware Primitives -- 2.2.1 Test&amp -- Set, Swap, and Compare&amp -- Swap -- 2.2.2 From Deadlock-Freedom to Starvation-Freedom -- 2.2.3 Fetch&amp -- Add -- 2.3 Mutex Without Atomicity -- 2.3.1 Safe, Regular, and Atomic Registers -- 2.3.2 The Bakery Mutex Algorithm -- 2.3.3 A Bounded Mutex Algorithm -- 2.4 Summary -- 2.5 Bibliographic Notes -- 2.6 Exercises and Problems -- 3 Lock-Based Concurrent Objects -- 3.1 Concurrent Objects -- 3.1.1 Concurrent Object -- 3.1.2 Lock-Based Implementation -- 3.2 A Base Synchronization Object: the Semaphore -- 3.2.1 The Concept of a Semaphore
  • 5.2.3 A Remark on Compare&amp -- Swap: The ABA Problem -- 5.2.4 A Non-blocking Queue Based on Read/Write Registers and Compare&amp -- Swap -- 5.2.5 A Non-blocking Stack Based on Compare&amp -- Swap Registers -- 5.2.6 A Wait-Free Stack Based on Fetch&amp -- Add and Swap Registers -- 5.3 Boosting Obstruction-Freedom to Stronger Progress in the Read/Write Model -- 5.3.1 Failure Detectors -- 5.3.2 Contention Managers for Obstruction-Free Object Implementations -- 5.3.3 Boosting Obstruction-Freedom to Non-blocking -- 5.3.4 Boosting Obstruction-Freedom to Wait-Freedom -- 5.3.5 Mutex-Freedom Versus Loops Inside a Contention Manager Operation -- 5.4 Summary -- 5.5 Bibliographic Notes -- 5.6 Exercises and Problems -- 6 Hybrid Concurrent Objects -- 6.1 The Notion of a Hybrid Implementation -- 6.1.1 Lock-Based Versus Mutex-Free Operation: Static Hybrid Implementation -- 6.1.2 Contention Sensitive (or Dynamic Hybrid) Implementation -- 6.1.3 The Case of Process Crashes -- 6.2 A Static Hybrid Implementation of a Concurrent Set Object -- 6.2.1 Definition and Assumptions -- 6.2.2 Internal Representation and Operation Implementation -- 6.2.3 Properties of the Implementation -- 6.3 Contention-Sensitive Implementations -- 6.3.1 Contention-Sensitive Binary Consensus -- 6.3.2 A Contention Sensitive Non-blocking Double-Ended Queue -- 6.4 The Notion of an Abortable Object -- 6.4.1 Concurrency-Abortable Object -- 6.4.2 From a Non-blocking Abortable Object to a Starvation-Free Object -- 6.5 Summary -- 6.6 Bibliographic Notes -- 6.7 Exercises and Problems -- 7 Wait-Free Objects from Read/Write Registers Only -- 7.1 A Wait-Free Weak Counter for Infinitely Many Processes -- 7.1.1 A Simple Counter Object -- 7.1.2 Weak Counter Object for Infinitely Many Processes -- 7.1.3 A One-Shot Weak Counter Wait-Free Algorithm -- 7.1.4 Proof of the One-Shot Implementation
  • 7.1.5 A Multi-Shot Weak Counter Wait-Free Algorithm -- 7.2 Store-Collect Object -- 7.2.1 Store-Collect Object: Definition -- 7.2.2 An Adaptive Store-Collect Implementation -- 7.2.3 Proof and Cost of the Adaptive Implementation -- 7.3 Fast Store-Collect Object -- 7.3.1 Fast Store-Collect Object: Definition -- 7.3.2 A Fast Algorithm for the store_collect() Operation -- 7.3.3 Proof of the Fast Store-Collect Algorithm -- 7.4 Summary -- 7.5 Bibliographic Notes -- 7.6 Problem -- 8 Snapshot Objects from Read/Write Registers Only -- 8.1 Snapshot Objects: Definition -- 8.2 Single-Writer Snapshot Object -- 8.2.1 An Obstruction-Free Implementation -- 8.2.2 From Obstruction-Freedom to Bounded Wait-Freedom -- 8.2.3 One-Shot Single-Writer Snapshot Object: Containment Property -- 8.3 Single-Writer Snapshot Object with Infinitely Many Processes -- 8.4 Multi-Writer Snapshot Object -- 8.4.1 The Strong Freshness Property -- 8.4.2 An Implementation of a Multi-Writer Snapshot Object -- 8.4.3 Proof of the Implementation -- 8.5 Immediate Snapshot Objects -- 8.5.1 One-Shot Immediate Snapshot Object: Definition -- 8.5.2 One-Shot Immediate Snapshot Versus One-Shot Snapshot -- 8.5.3 An Implementation of One-Shot Immediate Snapshot Objects -- 8.5.4 A Recursive Implementation of a One-Shot Immediate Snapshot Object -- 8.6 Summary -- 8.7 Bibliographic Notes -- 8.8 Problem -- 9 Renaming Objects from Read/Write Registers Only -- 9.1 Renaming Objects -- 9.1.1 The Base Renaming Problem -- 9.1.2 One-Shot Renaming Object -- 9.1.3 Adaptive Implementations -- 9.1.4 A Fundamental Result -- 9.1.5 Long-Lived Renaming -- 9.2 Non-triviality of the Renaming Problem -- 9.3 A Splitter-Based Optimal Time-Adaptive Implementation -- 9.4 A Snapshot-Based Optimal Size-Adaptive Implementation -- 9.4.1 A Snapshot-Based Implementation -- 9.4.2 Proof of the Implementation
  • Part V On the Foundations Side:From Safe Bits to Atomic Registers