Buffering in Computer Network

Buffer is a region of memory used to temporarily hold data while it is being moved from one place to another. A buffer is used when moving data between processes within a computer. Majority of buffers are implemented in software. Buffers are generally used when there is a difference between the rate at which data is received and the rate at which it can be processed. If we remove buffers, then either we will have data loss, or we will have lower bandwidth utilization.

What is Buffering ?
In Buffering, Whether the communication is direct or indirect, message exchanged by communicating processes reside in a temporary queue.

Types of Buffering :

  1. Zero Capacity –
    This queue cannot keep any message waiting in it. Thus it has maximum length 0. For this, a sending process must be blocked until the receiving process receives the message. It is also known as no buffering.
  2. Bounded Capacity –
    This queue has finite length n. Thus it can have n messages waiting in it. If the queue is not full, new message can be placed in the queue, and a sending process is not blocked. It is also known as automatic buffering.
  3. Unbounded Capacity –
    This queue has infinite length. Thus any number of messages can wait in it. In such a system, a sending process is never blocked.

Need of Buffering :

  • It helps in matching speed between two devices, between which the data is transmitted. For example, a hard disk has to store the file received from the modem.
  • It helps the devices with different data transfer size to get adapted to each other.
  • It helps devices to manipulate data before sending or receiving.
  • It also supports copy semantics.

Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.