Shared-memory Based Ring Buffer

This post explains how to implement a ring buffer that can be shared between multiple processes. For the simplicity and efficiency, shared memory is used to store the ring buffer. A read/write lock is also developed to sync the inter-process buffer read/write operations.

Shared-memory Based Ring Buffer_第1张图片


For full post, please refer to http://www.bo-yang.net/2016/07/27/shared-memory-ring-buffer

The source code can be found on my GitHub channel.



你可能感兴趣的:(C/C++,Unix/Linux)