Skip to:Content
|
Bottom
Cover image for Synchronization algorithms and concurrent programming
Title:
Synchronization algorithms and concurrent programming
Personal Author:
Publication Information:
England : Pearson Education Limited, 2006
Physical Description:
xv, 423 p. : ill. ; 24 cm.
ISBN:
9780131972599

Available:*

Library
Item Barcode
Call Number
Material Type
Item Category 1
Status
Searching...
30000010204507 QA76.9.D5 T38 2006 Open Access Book Book
Searching...

On Order

Summary

Summary

The first textbook that focuses purely on Synchronization - a fundamental challenge in Computer Science that is fast becoming a major performance and design issue for concurrent programming on modern architectures, and for the design of distributed systems.


Author Notes

Gadi Taubenfeld is an Associate Professor of Computer Science at the Interdisciplinary Center in Herzliya, Israel


Table of Contents

Prefacep. xiii
Key Featuresp. xv
Chapter 1 Introductionp. 1
1.1 Concurrent and Distributed Computingp. 1
1.1.1 Data Communication and Synchronizationp. 2
1.1.2 Contention, Cooperation, and Resource Allocationp. 2
1.2 Synchronization: Two Examplesp. 3
1.2.1 Why is Synchronization Difficult?p. 3
1.2.2 Too Much Milkp. 4
1.2.3 The Coordinated Attack Problemp. 8
1.3 The Mutual Exclusion Problemp. 10
1.3.1 The Problemp. 11
1.3.2 Commentsp. 13
1.4 Complexity Measuresp. 14
1.4.1 Counting Stepsp. 14
1.4.2 Counting Time Unitsp. 15
1.4.3 Counting Remote Memory Accessesp. 16
1.4.4 Space Complexityp. 17
1.5 Processes, Threads and Schedulingp. 17
1.5.1 Processesp. 17
1.5.2 Threadsp. 18
1.5.3 Schedulingp. 19
1.6 Bibliographic Notesp. 22
1.7 Problemsp. 23
Chapter 2 Mutual Exclusion Using Atomic Registers: Basic Topicsp. 31
2.1 Algorithms for Two Processesp. 31
2.1.1 Peterson's Algorithmp. 32
2.1.2 Kessels' Single-writer Algorithmp. 35
2.2 Tournament Algorithmsp. 37
2.2.1 A Solution Based on Peterson's Algorithmp. 38
2.2.2 A Solution Based on Kessels' Algorithmp. 40
2.3 A Fast Mutual Exclusion Algorithmp. 42
2.3.1 Lamport's Fast Algorithmp. 42
2.3.2 A Simple Observationp. 46
2.4 Starvation-free Algorithmsp. 47
2.4.1 Basic Definitionsp. 48
2.4.2 The Bakery Algorithmp. 49
2.4.3 The Black-White Bakery Algorithmp. 55
2.5 Tight Space Boundsp. 58
2.5.1 A Lower Boundp. 59
2.5.2 An Upper Bound: The One-bit Algorithmp. 63
2.5.3 Computing with Infinitely Many Processesp. 66
2.6 Automatic Discovery of Algorithmsp. 68
2.6.1 Three Algorithmsp. 69
2.6.2 More Resultsp. 70
2.7 Bibliographic Notesp. 71
2.8 Problemsp. 74
Chapter 3 Mutual Exclusion Using Atomic Registers: Advanced Topicsp. 97
3.1 Local Spinning Algorithmsp. 97
3.1.1 Local Spinningp. 98
3.1.2 The Local Spinning Black-White Bakery Algorithmp. 99
3.1.3 A Local Spinning Tournament Algorithmp. 101
3.2 Adaptive Algorithmsp. 104
3.2.1 Basic Definitionsp. 104
3.2.2 A Simple Adaptive Algorithmp. 105
3.2.3 An Adaptive Tournament Algorithmp. 110
3.2.4 The Adaptive Black-White Bakery Algorithmp. 116
3.2.5 An Impossibility Resultp. 119
3.3 Fault-tolerant Algorithmsp. 122
3.3.1 Defining Fault-tolerancep. 123
3.3.2 A Fault-tolerant Algorithmp. 124
3.3.3 Self-stabilizationp. 127
3.4 Symmetric Algorithmsp. 129
3.4.1 Symmetric Deadlock-free Algorithmsp. 130
3.4.2 Symmetric Starvation-free Algorithmsp. 132
3.4.3 Observations about Concurrencyp. 132
3.5 Bibliographic Notesp. 133
3.6 Problemsp. 136
Chapter 4 Blocking and Non-blocking Synchronizationp. 147
4.1 Synchronization Primitivesp. 147
4.1.1 Atomic Operationsp. 148
4.1.2 Objectsp. 150
4.1.3 Non-atomic Registersp. 152
4.2 Collision Avoidance using Test-and-set Bitsp. 153
4.2.1 A Trivial Deadlock-free Algorithmp. 153
4.2.2 Using a Test-and-test-and-set Bitp. 154
4.2.3 Collision Avoidance Locksp. 155
4.2.4 A Fast Starvation-free Algorithmp. 156
4.3 The Ticket Algorithm using RMW Objectsp. 157
4.3.1 The Ticket Algorithmp. 158
4.3.2 A Simple Lower Boundp. 159
4.4 Local Spinning using Strong Primitivesp. 160
4.4.1 Anderson's Queue-based Algorithmp. 160
4.4.2 Graunke and Thakkar Queue-based Algorithmp. 163
4.4.3 The MCS Queue-based Algorithmp. 165
4.5 Concurrent Data Structuresp. 169
4.5.1 Non-blocking and Wait-free Synchronizationp. 170
4.5.2 A Non-blocking Concurrent Queue Algorithmp. 171
4.6 Semaphoresp. 176
4.6.1 Constant Space Starvation-free Algorithmp. 178
4.6.2 Correctness Proofp. 179
4.7 Monitorsp. 181
4.8 Fairness of Shared Objectsp. 183
4.8.1 Fairness Propertiesp. 183
4.8.2 Basic Resultsp. 184
4.8.3 Algorithmsp. 186
4.9 Bibliographic Notesp. 189
4.10 Problemsp. 194
Chapter 5 Barrier Synchronizationp. 203
5.1 Barriersp. 203
5.2 Atomic Counterp. 204
5.2.1 A Simple Counter Barrierp. 204
5.2.2 A Local Spinning Counter Barrierp. 206
5.2.3 A Barrier without Shared Memory Initializationp. 206
5.3 Test-and-set Bitsp. 207
5.3.1 A Constant Space Barrierp. 207
5.3.2 An Asymmetric Barrier without Memory Initializationp. 208
5.4 Combining Tree Barriersp. 210
5.5 A Tree-based Barrierp. 212
5.6 The Dissemination Barrierp. 213
5.7 The See-Saw Barrierp. 215
5.7.1 The Algorithmp. 215
5.7.2 Correctness Proofp. 218
5.8 Semaphoresp. 219
5.9 Bibliographic Notesp. 221
5.10 Problemsp. 222
Chapter 6 The l-exclusion Problemp. 227
6.1 The Problemp. 227
6.2 Algorithms Using Atomic Registersp. 229
6.2.1 An l-starvation-free Algorithmp. 229
6.2.2 An Unbounded FIFO-enabling Algorithmp. 231
6.3 Using a Single Read-modify-write Registerp. 234
6.3.1 The Counter Algorithmp. 234
6.3.2 The Numbered Ticket Algorithmp. 235
6.3.3 The Unbounded Colored Ticket Algorithmp. 236
6.3.4 The Bounded Colored Ticket Algorithmp. 238
6.4 The l-assignment Problemp. 241
6.5 Bibliographic Notesp. 243
6.6 Problemsp. 245
Chapter 7 Multiple Resourcesp. 249
7.1 Deadlocksp. 249
7.2 Deadlock Preventionp. 252
7.2.1 Two Phase Locking and Timestamping-orderingp. 252
7.2.2 The Total Order Theoremp. 253
7.3 Deadlock Avoidance: The Problem of Deadly Embracep. 255
7.3.1 The Problemp. 255
7.3.2 The Banker's Algorithmp. 256
7.4 The Dining Philosophers Problemp. 259
7.4.1 The Problemp. 259
7.4.2 Preliminariesp. 260
7.4.3 Concurrency and Robustnessp. 262
7.5 Hold and Wait Strategyp. 263
7.5.1 The LR Algorithmp. 263
7.5.2 The LLR Algorithmp. 265
7.5.3 A Lower Boundp. 267
7.5.4 Relating Concurrency and Robustnessp. 268
7.6 Wait and Release Strategyp. 269
7.7 Randomized Algorithmsp. 271
7.7.1 The Free Philosophers Algorithmp. 272
7.7.2 The Courteous Philosophers Algorithmp. 272
7.8 Bibliographic Notesp. 274
7.9 Problemsp. 276
Chapters 8 Classical Synchronization Problemsp. 281
8.1 The Producer-Consumer Problemp. 281
8.1.1 Atomic Registersp. 282
8.1.2 Atomic Counterp. 283
8.1.3 General Semaphoresp. 284
8.1.4 Binary Semaphoresp. 284
8.1.5 Monitorsp. 286
8.1.6 Sleep and Wakeupp. 287
8.2 Readers and Writersp. 288
8.2.1 Semaphoresp. 289
8.2.2 Monitorsp. 290
8.3 The Sleeping Barberp. 292
8.4 The Cigarette Smoker's Problemp. 294
8.5 More Synchronization Problemsp. 297
8.5.1 Group Mutual Exclusion and Room Synchronizationp. 297
8.5.2 Concurrent Reading and Writing of Clocksp. 298
8.5.3 The Choice Coordination Problemp. 299
8.5.4 The H[subscript 2]O Problemp. 300
8.5.5 The Roller Coaster Problemp. 300
8.6 Bibliographic Notesp. 301
8.7 Problemsp. 303
Chapter 9 Consensusp. 307
9.1 The Problemp. 307
9.2 Three Simple Consensus Algorithmsp. 308
9.2.1 A Single 3-valued Read-modify-write Registerp. 308
9.2.2 Two Processes, Two Read-modify-write Bitsp. 309
9.2.3 Many Processes, Four Read-modify-write Bitsp. 310
9.3 Consensus without Memory Initializationp. 311
9.3.1 The Algorithmp. 312
9.3.2 Correctness Proofp. 314
9.4 Reaching Consensus Using a Shared Queuep. 316
9.5 Impossibility of Consensus with One Faulty Processp. 318
9.5.1 A Formal Modelp. 318
9.5.2 Basic Observationsp. 320
9.5.3 The Impossibility Theoremp. 321
9.6 The Relative Power of Synchronization Primitivesp. 325
9.7 The Universality of Consensusp. 328
9.7.1 Basic Definitionsp. 328
9.7.2 A Universal Constructionp. 330
9.8 Bibliographic Notesp. 334
9.9 Problemsp. 336
Chapter 10 Timing-based Algorithmsp. 343
10.1 Timing-based Systemsp. 343
10.2 Mutual Exclusion with Known Delaysp. 345
10.3 Fast Mutual Exclusion with Known Delaysp. 347
10.3.1 The Algorithmp. 347
10.3.2 Correctness Proofp. 348
10.4 Consensus with Known Delaysp. 352
10.5 Fast Consensus with Known Delaysp. 353
10.5.1 The Algorithmp. 353
10.5.2 Correctness Proofp. 354
10.6 Fast Consensus with Unknown Delaysp. 355
10.6.1 The Algorithmp. 355
10.6.2 Correctness Proofp. 357
10.7 Fast Mutual Exclusion with Unknown Delaysp. 359
10.7.1 The Algorithmp. 359
10.7.2 Correctness Proofp. 361
10.7.3 Time Complexityp. 363
10.8 Bibliographic Notesp. 365
10.9 Problemsp. 366
Bibliographyp. 373
Indexp. 417
Go to:Top of Page