Liveness & Fairness · Page 4 of 5
Strong Fairness
Weak fairness is not always enough.
Suppose three processes compete for a Mutex. Process p1 enters
waiting, while p2 repeatedly requests, acquires, and releases the lock.
Whenever p2 holds the lock, acquire(p1) is disabled — so
acquire(p1) is never continuously enabled! Under weak fairness alone,
p1 can starve forever.
strong_fairness(s.acquire(p)) — TLA⁺'s
SFvars(acquire(p)) — says: if an action is enabled infinitely
often (even if repeatedly interrupted), it must eventually happen.
Combined with weak_fairness(s.release(p)), strong fairness on
acquire proves starvation_free: every waiting process eventually
becomes the holder.
Try it: Click Check to verify
starvation_free
passes across all 20 states. Now replace strong_fairness with
weak_fairness on line 34 and click Check — watch the checker
produce the exact starvation cycle where p1 waits forever while p2
hogs the lock!