IT lexicon › Programming › Circular-wait

Circular-wait

Programming På svenska → Updated: 2026-11-16

The fourth deadlock condition: a cycle of threads where each waits on the next in the cycle.

Deadlock requires four conditions simultaneously. Circular-wait is the fourth: thread A waits for a resource held by B, B waits for one held by C, and so on until some thread waits for A. Without this cycle, forward progress can always be made.

Lock-ordering prevents it by enforcing a global total order — cycles become impossible. Deadlock algorithms like the banker's algorithm ensure the system never enters a state where such a cycle can form. Small systems often rely on manual review; larger ones need strict ordering or timeout mechanisms.

← Back to the lexicon