A circular buffer, circular queue, cyclic buffer or ring buffer is a data structure is a fixed-size buffer as if it were connected end-to-end or can be a dynamic one if implemented via Linked Lists. This is a data-structure quite popularly used in many parts of Linux Kernel such as Device Drivers, especially Network Hardware drivers, Network Packet Buffer such as sk_buff and so on. We can use a Ring Buffer in user-space application programming too. These kind of buffers are more suited for holding steady stream of incoming data. For example Network Packets. If the buffer gets full, we can discard the oldest buffer elements (such as packets). And to avoid we can increase the buffer size. So circular ring buffers plays a major role especially in Network Appliances such as Routers, Firewalls, etc.
Here is an extensive multi-part YouTube video of mine on Circular Ring Buffers, its Architecture and the big picture:
I also conduct sessions/classes on Systems and Network Software Programming, Linux Kernel Programming and Architecture. If you are interested, click HERE for more details.
If you have any queries or anything to discuss further on Linux Kernel Programming and writing Kernel modules kindly feel free to contact me.