Lock convoy

[1][2] Unlike deadlock and livelock situations, the threads in a lock convoy do progress; however, each time a thread attempts to acquire the lock and fails, it relinquishes the remainder of its scheduling quantum and forces a context switch.

The overhead of repeated context switches and underutilization of scheduling quanta degrade overall performance.

A lock convoy behaves similarly to car convoys ("wide moving jam") forming and dissipating on highways suffering traffic congestion[3]: when more cars drive on the road than the road can sustain, one car eventually has to stop.

Lock convoys often occur when concurrency control primitives such as locks serialize access to a commonly used resource, such as a memory heap or a thread pool.

They can sometimes be addressed by using non-locking alternatives such as lock-free algorithms or by altering the relative priorities of the contending threads.