Why it matters

Lock-free queues scale under contention. Standard in libs like Boost.Lockfree and JCTools.

Advertisement

The architecture

CAS head + tail.

Handle ABA problem with tag.

Progress guarantee.

Lock-free queuesCAS head/tailatomic operationsABAsolved by tagGuaranteelock-free progressMichael-Scott 1996; ABA problem needs tag or hazard pointers
Lock-free queues.
Advertisement

How it works end to end

Michael-Scott 1996.

Hazard pointers or epoch.

ABA solved by tag.