Tags

#Ring-Buffer

3 posts

Hands-on Practice #18 16 min read

Thread-Safe Queues

From one mutex to many producers: condition variables and lost wakeups in a blocking queue, rte_ring’s two pairs of indices and in-order publishing, Disruptor’s availability flags, and whether a full queue should block, drop, or …

Low-Latency Systems Development #5 22 min read

An SPMC Broadcast Ring in Shared Memory

Market data has one producer and several consumers, each of which must see every message, and the producer is the hot path that may not wait for anyone. The answer is a broadcast ring: every slot carries its own sequence stamp, …

Low-Latency Systems Development #4 24 min read

Lock-Free Queues and Micro-Batching

A lock-free SPSC queue works because every shared variable has exactly one writer: each side updates only its own counter and merely reads the other’s. The rest is keeping that property from being quietly undone — a shared element …