A lock-free ring-buffer with contiguous reservations (2019)

Andrea Lattuada and James Munns collaborated to create a high-performance lock-free ring-buffer for cross-thread communication, catering to those interested in concurrency, systems programming, and efficient software design. They explain the concept of circular buffers as a communication primitive, considering real-world constraints. The post delves into ideal and bounded circular buffers, DMA concepts in microcontroller systems, and the need for contiguous memory access. The authors present a non-blocking implementation featuring two regions for valid data and coordinating write and read pointers. They emphasize the importance of memory ordering in achieving thread safety, with differences between x86 and ARM platforms. Andrea’s implementation prioritizes performance, while James offers embedded system support with statically allocated ring-buffer instances.

https://ferrous-systems.com/blog/lock-free-ring-buffer/

To top