answersLogoWhite

0


Best Answer

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
This answer is:
User Avatar

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