Spooling and Buffering

Spooling (Simultaneous Peripheral Operation On-Line)

Spooling's name comes from the acronym for simultaneous peripheral operation online (SPOOL). Spooling waits until the entire operation is done before sending it to the output device or a network, and the term probably comes from sending a document to a printer.

From the early days of computer systems, the execution speed of the CPU has always been faster than any other I/O devices. If no special techniques are applied, then the CPU remains idle most of the time as it has to wait for other peripheral devices. To solve this issue, the technique spooling was introduced, and it is most widely used in printing technology.

Spooling makes use of the computer and input/output device. It is used for storing data temporarily on a computer and can be carried out online or offline. Spooling waits until the entire operation is done, which probably comes from sending a document to a printer.

We know that there is a delay between pressing "print" and the document coming out of the printer. The computer processes the entire print job into a format the printer can handle and sends it down the serial bus to the printer. Since the processor is fast enough, it sends the data to be printed to a buffer—an intermediate space where data are kept temporarily. This part is handled by the spooler program. Whenever the printer becomes free, it fetches those buffered data, which is done by the de-spooling program.

Spool and Buffer

Advantage of Spooling

  • CPU and I/O devices work more efficiently.

  • Overall performance of the system is increased.


Spool and Buffer

Buffering

Buffering is an area of computer's memory (RAM) or device memory for holding data during data transfer. Normally, input/output devices have lower speed than that of the processor. This speed difference is adjusted by having temporary data storage in memory, typically called a buffer. While the device is in operation, data transfer can take place in the buffer. This process of holding data temporarily allows I/O devices to access data smoothly.

Buffering is typically associated with video viewing on the web. It is the process where some contents from a remote machine or website are temporarily copied onto our desktop so that we can view them. Once we finish viewing and close the browser or connection, this file/content is erased from our machine.

Example: YouTube – Everything we view on YouTube is buffered to our desktop, but the moment we close the browser, the contents are gone.

Spooling and Buffering


Conclusion

Spooling and buffering are essential techniques in computing that bridge the speed gap between the CPU and slower I/O devices. While spooling manages complete tasks like print jobs by storing them temporarily and releasing them when devices are ready, buffering provides temporary storage during data transfer to ensure smooth operation. Both processes increase efficiency and improve overall system performance.



Previous Post Next Post