What is Buffering in OS?
It is a technique to use the computer's memory. In this, data is temporarily kept in memory (RAM). Normally buffering is required when data is sent from one place to another.
Buffering has many benefits such as: When you give a command to print the document, it is placed in the print buffer. Even if you close the document after this, the printing will not stop.
When we play a video from the Internet, that video is loaded in small pieces in the temporary memory (RAM) which is called a buffer.
If the internet speed is slow, then you can see it directly when the entire video is loaded in the buffer, then you can play it without any hindrance.
Buffering in Operating System:
Similarly, while doing CD_write, it keeps the data in a buffer and then writes it. The process of storing in buffer memory is called buffering. We can consider a buffer as a special area that is shared by different devices.
Buffer is required because the working speed of different devices is different and if the computer system has to work from any device, then it cannot wait till its work is completed, so transfer it to the buffer memory. gives.
Read Also - What is System Call? Its types and functions in the operating system
Which is used by that device. Its device keeps on doing its work and the computer is ready to do any other work.
Types of Buffering :
- Single Buffering
- Double Buffering
- Circular Buffering
1. Single Buffering :
2. Double Buffering :
3. Circular Buffering :
Reasons of Buffering
- Buffering creates a synchronization between two devices with different processing speeds. For example, if the hard disk is transferring data at a very high speed and the printer is accepting the data slowly, then buffering is required in such a situation.
- Buffering is also required in cases where two devices have different data block sizes.
- I/O operations also require buffering to support copy semantics.
0 Comments