Many waiters wake for one opportunity
A thundering herd occurs when many waiters wake for the same event and compete for a much smaller amount of available work. If a single item arrives but every worker is notified, most awakened workers may obtain nothing and return to sleep. Wakeup and lock-acquisition overhead can then consume substantial resources. Distinguish this notification pattern from a cache stampede, where simultaneous misses trigger redundant regeneration or fetching. They can occur together, but identifying which mechanism creates the redundant work is necessary to choose an effective remedy.
Thirty-two workers compete for one item
Consider thirty-two workers waiting on a condition variable for a queue to become nonempty. Broadcasting after one insertion wakes all of them, although only one can remove that item. The others reacquire the lock, examine the predicate and wait again. A notification does not reserve the queued item for its recipient. Checking the predicate in a loop remains essential for correctness in the presence of competition and spurious wakeups. Removing that check to reduce apparent overhead would trade a performance symptom for an incorrect synchronization protocol.
Readiness does not reserve a resource
Readiness-based I/O can produce related patterns when several waiters observe the same opportunity. Linux epoll provides EPOLLEXCLUSIVE for particular registration patterns to help limit wakeups, with restrictions on flags and registration operations. It is not a general replacement for application synchronization, and readiness still does not mean ownership of the resource. Compare wakeups with completed useful work, unsuccessful acquisitions and CPU cost. Those observations distinguish excess coordination from a system that is simply busy serving a genuinely large number of independent requests.
Adjust notification scope and waiting
When one work item only enables one worker to proceed, consider a targeted notification rather than a broadcast. A state change that enables every waiter, such as shutdown, may legitimately require broadcasting. Dispatching jobs, splitting wait queues or batching notifications can also help. Notification suppression can go too far: a broken protocol may leave available work with every worker asleep. Design state transitions and notification rules together, and test both ordinary arrivals and lifecycle events. The goal is sufficient wakeups for progress, not the smallest wakeup count regardless of behavior.