← BYTES
Unix IPC·Starter·Ref: 15.1.83

What is the basic difference between livelock and deadlock?

Have a question about this video? Mention reference 15.1.83 when you contact us.

a.They are two different names for the exact identical situation
b.Livelock only occurs on single-core systems, while deadlock only occurs on multi-core systems
c.In deadlock, threads are stuck waiting and doing nothing at all; in livelock, threads are actively running and doing WORK (e.g. repeatedly retrying and backing off from each other) but never actually make real forward progress toward completing their task
d.Livelock is always resolved automatically within one second, while deadlock never resolves
Both are forms of being permanently stuck, but differently: deadlocked threads are simply blocked, doing nothing. Livelocked threads are actively busy -- running real CPU cycles, often repeatedly retrying and yielding to each other -- but never actually make genuine forward progress, which can make it a more confusing failure mode to diagnose than an obviously-frozen deadlock.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES15183#UnixIPC