Spooling
From Wikipedia, the free encyclopedia
In computer science, spooling refers to putting jobs in a buffer, a special area in memory, or on a disk where a device can access them when it is ready. This is similar to a sewing machine spool, which a person puts thread onto, and a machine pulls at its convenience. Spooling is useful because devices access data at different rates. The buffer provides a waiting station where data can reside while the slower device catches up. Material is only added and deleted at the ends of the area; there is no random access or editing. This also allows the CPU to work on other tasks while waiting for the slower device to do its task.
It can also refer to a storage device that incorporates a physical spool, such as a tape drive.
The most common spooling application is print spooling. In print spooling, documents are loaded into a buffer (usually an area on a disk), and then the printer pulls them off the buffer at its own rate. Because the documents are in a buffer where they can be accessed by the printer, the user is free to perform other operations on the computer while the printing takes place in the background. Spooling also lets users place a number of print jobs in a queue instead of waiting for each one to finish before specifying the next one.
The temporary storage area to which e-mail is delivered by a Mail Transfer Agent and in which it waits to be picked up by a Mail User Agent is sometimes called a mail spool. Likewise, a storage area for Usenet articles may be referred to as a news spool. (On Unix-like systems, these areas are usually located in the /var/spool directory.) Unlike other spools, mail and news spools usually allow random access to individual messages.
[edit] Origin of the term
"Spool" is supposedly an acronym for simultaneous peripheral operations on-line (although this is thought by some to be a backronym). Early mainframe computers had relatively small and expensive (by current standards) hard disks. These costs made it necessary to reserve the disks for files that required random access, while writing large sequential files to reels of tape. Typical programs would run for hours and produce hundreds or thousands of pages of printed output. Periodically the program would stop printing for a while to do a lengthy search or sort. But it was desirable to keep the printer(s) running continuously. Thus when a program was running, it would write the printable file to a spool of tape, which would later be read back in by the program controlling the printer.
[edit] See also
Spoolers:
- Berkeley printing system (lpr/lpd)
- CUPS