Waiting without spinning

Two cores reaching for one shared counter, and a lock that lets only one of them touch it at a time. This lesson is about what comes after the lock: a thread that holds it, finds nothing it can do yet, and has to wait.
Before you start. When two threads touch the same memory at once, an update can be lost, and a lock fixes that by letting only one thread at a time near the shared value (Concurrency & the Hardware). The scheduler, the part of the kernel that hands out turns on the cores, can set a waiting thread aside and give its turns to others until something wakes it (Whose turn, and who decides).