Problem Statement
What is buffering in the context of I O systems? Explain its purpose and trade-offs.
Explanation
Buffering is the technique where a temporary memory area (buffer) is used to hold data while it moves between two devices or between device and main memory. The purposes include: decoupling producer and consumer speeds, reducing number of I O operations, and smoothing out bursts of data. The trade-offs are: using additional memory, possible latency for filling buffer, and complexity in flushing or synchronising buffer contents. For example print spooling uses a buffer queue to accumulate print jobs before the printer handles them.
