


A buffer is a memory area that stores data being transferred between two devices or between a device and an application.
What is I/O Buffering?
I/O buffering is a technique used in computer systems to improve the efficiency of input and output (I/O) operations. It involves the temporary storage of data in a buffer, which is a reserved area of memory, to reduce the number of I/O operations and manage the flow of data between fast and slow devices or processes.
Uses of I/O buffer
A block-oriented device stores information in blocks that are usually of
fixed size, and transfers are made one block at a time. Generally, it is possible to
reference data by its block number. Disks and USB keys are examples of block-
oriented devices.
A stream-oriented device transfers data in and out as a stream of
bytes, with no block structure. Terminals, printers, communications ports, mouse
and other pointing devices, and most other devices that are not secondary storage
are stream oriented.
Types of I/O Buffering Techniques
1. Single Buffer
Using one buffer to store data temporarily. A buffer is provided by the operating system to the system portion of the main memory.
2. Double Buffer
In this technique the operating system Uses two buffers to allow continuous data transfer between two process.
3. Circular Buffer
In this technique the operating system Uses a circular buffer to manage continuous data streams efficiently.