what is spooling in operating system

11 months ago 64
Nature

Spooling is a process in which data is temporarily held to be used and executed by a device, program, or system. Data is sent to and stored in memory or other volatile storage until the program or computer requests it for execution. Spooling makes use of the disc as a large buffer to send data to printers and other devices, and it can also be used as an input, but it is more commonly used as an output. The acronym SPOOL stands for simultaneous peripheral operation online.

Spooling refers to putting data of various I/O jobs in a buffer. This buffer is a special area in memory or hard disk which is accessible to I/O devices. The spool is processed in ascending order, working based on a FIFO (first-in, first-out) algorithm. The following are some of the advantages of spooling:

  • Since there is no interaction of I/O devices with CPU, the CPU need not wait for the I/O operation to take place. The I/O operations take a large amount of time.
  • Spooling is more efficient since it maintains parallel computation, and the computer can perform I/O in parallel order. Computers can read data from tape, write data to disk, and write to tape printers while performing computing tasks.
  • A device can be used for input and output simultaneously.

Examples of spooling include printing, where documents to be printed are saved in the spool and then added to the printing queue. During this time, many processes can run and use the CPU without waiting while the printer runs the printing process on each document one by one.