answersLogoWhite

0

single buffer : you read and write on the same buffer, can be messy if both reading and writing take place at the same time.

double buffer : you read one buffer and you write the other one. When both reading and writing are complete, the buffers are swapped. It solves the problem of simultaneous reading and writing but requires synchronization.

circular buffer : this a buffer with two pointer : read and write. If both pointers are equal, the buffer is empty.
For each write operation, the write pointer advances and each time data is read back, the read pointer advances. It is circular because when a pointer reaches the end, it wraps back to the beginning.
It may be used to implement a queue which allows simultaneous reading and writing without synchronization as long as the buffer is not full.

A double buffer is basically a circular buffer of size 2 and a single buffer is basically a circular buffer of size 1.

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
BeauBeau
You're doing better than you think!
Chat with Beau

Add your answer:

Earn +20 pts
Q: What is difference between single double and circular buffer?
Write your answer...
Submit
Still have questions?
magnify glass
imp