Circular Buffer – Part II

Last week I was chatting with software engineer about Circular Buffers. As far as I understand a circular buffer is a data structure typically implemented with an array of fixed length. There are two indices which are used to determine where to put / add / insert the next element and the other were to pull / remove the last element. The data structure implements a LIFO buffer.

I have used “Circular Buffers” on many occasions. The oldest implementations, besides college assignments, have been in device drivers on different real time operating systems to manage keyboard input, serial input and Internet input. A year or so ago I recalled a situation in which I used a Circular Buffer to implement copying files between two networked computers; one was the client and the other a server. Continue reading “Circular Buffer – Part II”