Talk:Circular buffer
From Wikipedia, the free encyclopedia
Contents |
[edit] history
When was the ring buffer invented or first publicly discussed or first mentioned in an academic paper or first used in an actual operating system? 209.252.104.131 (talk) 10:47, 16 March 2008 (UTC)
[edit] no mention of additional overheads
one still has to always check before a read or a write if the read pointer and a write pointer overlap.
this is never needed incase of a simple write ->read->write buffer a simple write->read->write kind of buffer works sequentially and simply does not let one write to the buffer is someone has not read what is already written because it assumes buffer_size=max message size and simply keeps check of whether the buffer is read or not.
[edit] incoherence between 2 paragraphs
In Circular buffer mechanics paragraph, it says that the start pointer points to the start of valid data and the end pointer points to the end of valid data. So, in my understanding, and according to the figures:
- 1 element buffer: start = end
- Full buffer: start = (end+1)%size
- Free buffer: not defined since we have no "valid data", but we can suppose that start = end too.
In the following paragraph Difficulties, a full buffer is represented with start = end. This is the same for the free buffer. We can suppose that the rule is different in this paragraph: the start pointer points to the start of valid data and the end pointer points to the next element after the end of valid data (if any). If there is no valid data, start = end.
Did I miss something ? —Preceding unsigned comment added by 84.14.106.33 (talk) 14:45, August 27, 2007 (UTC)
You didn't miss anything, the Circular buffer mechanics paragraph is incorrect, the first pointer will point to the first element to be read, and the second pointer will point to the first element to be written. I'm going to try to remember this when I have some time to correct the diagrams and fix it. 70.230.2.66 (talk) 23:24, 10 March 2008 (UTC)
[edit] Buffer border
In Circular buffer mechanics it talks about a "buffer border". What is the buffer border and when can it be "read over"? 137.44.2.188 (talk) 09:51, 9 April 2008 (UTC)