From The Art of Multiprocessor Programming by Herlihy:
If a thread cannot immediately acquire a lock, it can either spin, repeatedly testing whether the desired event has happened, or it can block, giving up the processor for a while to allow another thread to run.
Chapter 7 Spin Locks and Contention
... In this chapter, we turn our attention to locks that use spinning.
Chapter 8 Monitors and Blocking Synchronization
8.1 Introduction 177
8.2 Monitor Locks and Conditions 178
8.2.1 Conditions 179
8.2.2 The Lost-Wakeup Problem 181
8.3 Readers–Writers Locks 183
8.3.1 Simple Readers–Writers Lock 184
8.3.2 Fair Readers–Writers Lock 185
8.4 Our Own Reentrant Lock 187
8.5 Semaphores 189
Since Chapter 7 is for spin locks, and the title of Chapter 8 has "blocking", is Chapter 8 all for locks that "block" instead of "spinning"?
In particular, are Readers-Writers locks and Reentrant Locks locks that "block" instead of "spinning"?
Thanks.