Lock-free programming remains essential for ultra-low-latency systems. This survey covers the current state of lock-free data structures in C++, with focus on patterns used in trading infrastructure.

SPSC Ring Buffers

Single-producer single-consumer (SPSC) ring buffers remain the workhorse of inter-thread communication in trading systems. Modern implementations use cache line padding, relaxed memory ordering on the fast path, and power-of-two sizing for branchless index wrapping.

Lock-Free Order Books

Order book implementations have converged on a hybrid approach: lock-free for the hot path (price level updates) with occasional locked operations for structural changes (new price level insertion). This pragmatic design recognizes that true lock-freedom for all operations adds complexity without proportional latency benefit.

Beyond Hazard Pointers

Epoch-based reclamation (EBR) has largely replaced hazard pointers in production systems. The lower per-access overhead of EBR outweighs its less predictable reclamation timing for most trading workloads.