0
1.1kviews
Write note on Buffering Techniques.
1 Answer
0
13views

Buffering

• Suppose that a user process wishes to read blocks of data from a disk .The simplest way would be to execute an I/0 command to the disk unit and then wait for the data to become available. The waiting could either be busy waiting (continuously test the device status) or, more practically, process suspension on an interrupt.

• To avoid these overheads and inefficiencies, it is sometimes convenient to perform input transfers in advance of requests being made and to perform output transfers some time after the request is made. This technique is known as buffering.

• Buffering is a technique by which the device manager can keep slower I/O devices busy (by transferring the data in advance) during times when a process is not requiring I/O operations.

Types of Buffering

Types of I/O buffering schemes:

• No Buffering

• Single buffering

• Double buffering

• Circular buffering

No Buffering

  • Without a buffer, the OS directly accesses the device when it needs

1

Single buffering

  • Operating system assigns a buffer in main memory for an I/O request

2

Double Buffering

  • Use two system buffers instead of one
  • A process can transfer data to or from one buffer while the operating system empties or fills the other buffer
  • Also known as buffer swapping

4

Circular Buffering

  • Two or more buffers are used
  • Each individual buffer is one unit in a circular buffer
  • Used when I/O operation must keep up with process

3

Please log in to add an answer.