7.6 Spooling


Spool refers to the process of placing data in a temporary working area for another program to process. Spooling stands for Simultaneously Peripheral Operations Online. During a spooling operation, only one job is performed at a time and other jobs wait in a queue to be processed. Advantages of spooling are:
It can produce multiple copies of the output without running the process again.
Processes are not suspended for a long time.
Devices access data at different rates.

Disadvantages of spooling are:
Need large amounts of disk space.
Increase disk traffic.
Not practical for real-time environment, because results are produce at a later time.

The most common spooling application is print spooling. Documents to be printed are loaded into a buffer such as an area on a disk. The printer can access and print only a single document at a time. With spooling, multiple processes can put documents to a print queue without waiting. As soon as a process has written its document to the spool device, the process can perform other tasks, while a separate printing process operates the printer.