Buffers are often used in conjunction with
I/O to
hardware, such as
disk drives, sending or receiving data to or from a
network, or playing sound on a speaker. A line to a
rollercoaster in an amusement park shares many similarities. People who ride the coaster come in at an unknown and often variable pace, but the roller coaster will be able to load people in bursts (as a coaster arrives and is loaded). The
queue area acts as a buffer—a temporary space where those wishing to ride wait until the ride is available. Buffers are usually used in a
FIFO (first in, first out) method, outputting data in the order it arrived. Buffers can increase application performance by allowing
synchronous operations such as file reads or writes to complete quickly instead of blocking while waiting for hardware interrupts to access a physical disk subsystem; instead, an operating system can immediately return a successful result from an API call, allowing an application to continue processing while the kernel completes the disk operation in the background. Further benefits can be achieved if the application is reading or writing small blocks of data that do not correspond to the block size of the disk subsystem, which allows a buffer to be used to aggregate many smaller read or write operations into block sizes that are more efficient for the disk subsystem, or in the case of a read, sometimes to completely avoid having to physically access a disk. ==Telecommunication buffer==