- Temporary storage in memory used to hold data while it’s being transferred between devices or processes
- Acts as an intermediary
- Used commonly in IO-ops, network communications and data processing
- Helps in making sure the data transfer for both source and destination is steady to prevent data loss or corruption
- Buffers are typically found as fixed-size memory regions
- Data is written/read from buffers in chunks
- When a buffer is full, the data is transferred to it’s destination, when it’s empty, it’s refilled from source
Types of buffers
- Single Buffer: Simple buffer used to transfer data between 2 devices
- Double Buffer: Uses 2 buffers to transfer data between 2 devices. One buffer can manipulate the data as the second buffer transfers to the next device.
- Circular Buffer: Involves collections of more than 2 buffers. Generally using circular buffers increase transfer rate.