a field guide to resurrected wordsentry № 004

livelock

/ ˈlaɪv·lɒk /
noun · English live + lock, after deadlock — “a lock that keeps moving”

Two parties endlessly reacting to each other, never advancing. Both of them are moving. Neither is getting anywhere.

meet the corridor
exhibits
Livelock // Scheduler Diagnostic Console
mutex.trap · α holds L1 wants L2 · β holds L2 wants L1 · calibrate to break the loop
● LIVELOCK ACTIVE
Scheduler Calibration
Backoff Variance Δt ◂ start here5
secondary tuning ▾
Politeness Coeff.92
Quantum Time Slice45
BREAK: high Δt — or drag α/β nodes apart.
● LIVELOCKED — 100% CPU, 0% useful work
CTX SWITCHES/s 0[α: YIELD] ⇄ [β: YIELD]ICACHE_PTR 0x0000
Live Event Stream

Two threads, perfectly courteous, perfectly stuck: Alpha holds Lock 1 and wants Lock 2; Beta holds Lock 2 and wants Lock 1. Each detects the conflict, politely releases, waits a quantum, and retries — in lockstep, forever, at 100% CPU and 0% throughput. The console spotlights the one lever that matters: drag Backoff Variance all the way up and the retries scatter out of step — or drag the thread nodes far enough apart that propagation delay breaks the timing. Either lets one thread finally slip past. The cure for too much agreement is a little noise.

Lifeline of the Word

etymology
Built from deadlock — but alive, and that is the cruelty.

The word is modelled on deadlock, swapping dead for live. A deadlock is honest: everything has stopped. A livelock keeps every part busy, polite, and in motion — and still nothing advances. The name promises activity and delivers none of its fruit.

the distinction
Deadlock freezes. Livelock sprints in place.

Two cars at a one-lane bridge, both backing up to let the other through, both pulling forward again, in perfect time. No one is blocked by a stopped rival — each is blocked by the other's helpfulness. Equally fatal, far more maddening, because from a distance it looks like cooperation.

1970s
Ethernet hits it on the wire, and invents the cure.

Two stations transmit, collide, and both back off — by the same fixed interval — so they collide again, and again. CSMA/CD's fix is the whole lesson of livelock in one trick: back off by a random, exponentially growing amount. Break the symmetry and the deadlock-that-moves dissolves.

dining philosophers
Five philosophers, five forks, infinite courtesy.

Each picks up the left fork and waits for the right. To avoid deadlock, they all put the fork down and retry — in unison. Now they loop forever, lifting and lowering forks in synchrony, starving politely. The livelock variant of the classic problem, and the reason every solution adds asymmetry or a timeout.

distributed systems
Retry storms: a thousand clients, all backing off in step.

A service hiccups, every client retries at once, the retries themselves overload it, everyone backs off by the same amount and retries again together. The thundering herd. The fix is the Ethernet fix, scaled up: randomized, jittered backoff. Sameness is the disease; jitter is the medicine.

everyday
You have done this in a doorway. Both of you laughed.

The sidestep shuffle — two people mirroring each other's dodge, left then right then left, until one finally just stops and the other slips past. It is funny in a hallway and catastrophic in a datacenter, but it is exactly the same bug: two agents reacting symmetrically to each other in real time.

now
Microservices retry in lockstep; the answer never changes.

Leader elections that keep re-electing, autoscalers that oscillate, agents that keep yielding to each other's output — all livelock, all solved the same way the wire was solved in the seventies. Add jitter. Add a timeout. Let one side, just once, refuse to be so accommodating.