Preface
Acknowledgments
1 Introduction
1.1 Shared Objects and Synchronization
1.2 A Fable
1.2.1 Properties of Mutual Exclusion
1.2.2 The Moral
1.3 The Producer–Consumer Problem
1.4 The Readers–Writers Problem
1.5 The Harsh Realities of Parallelization
1.6 Parallel Programming
1.7 Chapter Notes
1.8 Exercises
Ⅰ PRINCIPLES
2 Mutual Exclusion
2.1 Time
2.2 Critical Sections
2.3 2-Thread Solutions
2.3.1 The LockOne Class
2.3.2 The LockTwo Class
2.3.3 The Peterson Lock
2.4 The Filter Lock
2.5 Fairness
2.6 Lamport’s Bakery Algorithm
2.7 Bounded Timestamps
2.8 Lower Bounds on the Number of Locations
2.9 Chapter Notes
2.10 Exercises
3 Concurrent Objects
3.1 Concurrency and Correctness
3.2 Sequential Objects
3.3 Quiescent Consistency
3.3.1 Remarks
3.4 Sequential Consistency
3.4.1 Remarks
3.5 Linearizability
3.5.1 Linearization Points
3.5.2 Remarks
3.6 Formal Definitions
3.6.1 Linearizability
3.6.2 Compositional Linearizability
3.6.3 The Nonblocking Property
3.7 Progress Conditions
3.7.1 Dependent Progress Conditions
3.8 The Java Memory Model
3.8.1 Locks and Synchronized Blocks
3.8.2 Volatile Fields
3.8.3 Final Fields
……
4 Foundations of Shared Memory
5 The Relative Power of Primitive Synchronization Operations
6 Universality of Consensus
Ⅱ PRACTICE 7 Spin Locks and Contention
8 Monitors and Blocking Synchronization
9 Linked Lists: The Role of Locking
10 Concurrent Queues and the ABA Problem
11 Concurrent Stacks and Elimination
12 Counting, Sorting, and Distributed Coordination
13 Concurrent Hashing and Natural Parallelism
14 Skiplists and Balanced Search
15 Priority Queues
16 Futures, Scheduling, andWork Distribution
17 Barriers
18 Transactional Memory
Ⅲ APPENDIXBibliography
Index