A livelock occurs when threads keep reacting to one another but make no useful progress. Unlike a deadlock, they are still running: they may repeatedly check or retry an operation rather than block. section 7.1.4 section 11.1.1
Two threads retrying
In a lock-free data structure, two threads may each change the structure in a way that forces the other’s operation to restart. Both loop and retry. It resembles two people trying to pass through a narrow gap at once: each backs away, then tries again. Scheduling may eventually let one proceed, but the repeated retries waste performance. section 7.1.4
Livelock can resemble deadlock because tasks stop progressing, but active loops can drive CPU usage high. Random scheduling may eventually resolve some cases, after a delay. Wait-free code cannot livelock because it bounds the steps required for an operation, though such algorithms may be more complex. section 11.1.1 section 7.1.4


