[go: up one dir, main page]

Jump to content

Spooling

From Wikipedia, the free encyclopedia
Magnetic recording tape wound onto a spool may have contributed to the origin of the term

In computing, spooling is a specialized form of multi-programming for the purpose of copying data between different devices. In contemporary systems,[a] it is usually used for mediating between a computer application and a slow peripheral, such as a printer. Spooling allows programs to "hand off" work to be done by the peripheral and then proceed to other tasks, or to not begin until input has been transcribed. A dedicated program, the spooler, maintains an orderly sequence of jobs for the peripheral and feeds it data at its own rate. Conversely, for slow input peripherals, such as a card reader, a spooler can maintain a sequence of computational jobs waiting for data, starting each job when all of the relevant input is available; see batch processing. The spool itself refers to the sequence of jobs, or the storage area where they are held. In many cases, the spooler is able to drive devices at their full rated speed with minimal impact on other processing.

Spooling is a combination of buffering and queueing.

[edit]

Nowadays, the most common use of spooling is printing: documents formatted for printing are stored in a queue at the speed of the computer, then retrieved and printed at the speed of the printer. Multiple processes can write documents to the spool without waiting, and can then perform other tasks, while the "spooler" process operates the printer.[1]

For example, when a large organization prepares payroll cheques, the computation takes only a few minutes or even seconds, but the printing process might take hours. If the payroll program printed cheques directly, it would be unable to proceed to other computations until all the cheques were printed. Similarly, before spooling was added to PC operating systems, word processors were unable to do anything else, including interact with the user, while printing.

Spooler or print management software often includes a variety of related features, such as allowing priorities to be assigned to print jobs, notifying users when their documents have been printed, distributing print jobs among several printers, selecting appropriate paper for each document, etc.

A print server applies spooling techniques to allow many computers to share the same printer or group of printers.

[edit]
Sample banner page generated by TSS/370

Print spoolers[b] can be configured to add a banner page, also called a burst page, job sheet, or printer separator, to the beginning and end of each document and job. These separate documents from each other, identify each document (e.g. with its title) and often also state who printed it (e.g. by username or job name). Banner pages are valuable in office environments where many people share a small number of printers. They are also valuable when a single job can produce multiple documents. Depending on the configuration, banner pages might be generated on each client computer, on a centralized print server, or by the printer itself.

On printers using fanfold continuous forms a leading banner page would often be printed twice, so that one copy would always be face-up when the jobs were separated. The page might include lines printed over the fold, which would be visible along the edge of a stack of printed output, allowing the operator to easily separate the jobs. Some systems would also print a banner page at the end of each job, assuring users that they had collected all of their printout.

Other applications

[edit]

Spooling is also used to mediate access to punched card readers and punches, magnetic tape drives, and other slow, sequential I/O devices. It allows the application to run at the speed of the CPU while operating peripheral devices at their full rated speed.

A batch processing system uses spooling to maintain a queue of ready-to-run tasks, which can be started as soon as the system has the resources to process them.

Some store and forward messaging systems, such as uucp, used "spool" to refer to their inbound and outbound message queues, and this terminology is still found in the documentation for email and Usenet software.

History

[edit]

Peripheral devices have always been much slower than core processing units. This was an especially severe problem for early mainframes. For example, a job which read punched cards or generated printed output directly was forced to run at the speed of the slow mechanical devices. The first spooling programs, such as IBM's "SPOOL System" (7070-IO-076) copied data from punched cards to magnetic tape, and from tape back to punched cards and printers. Hard disks, which offered faster I/O speeds and support for random access, started to replace the use of magnetic tape for spooling in the middle 1960s, and by the 1970s had largely replaced it altogether.

Because the unit record equipment on IBM mainframes of the early 1960s was slow, it was common for larger systems to use a small offline computer such as an IBM 1401 instead of spooling.

The term "spool" may originate with the Simultaneous Peripheral Operations On-Line[2][3] (SPOOL) software;[4] this derivation is uncertain, however. Simultaneous peripheral operations on-line may be a backronym.[5][verification needed] Another explanation is that it refers to "spools" or reels of magnetic tape, although “spool” is an uncommon usage.

List of spooling systems

[edit]

Notes

[edit]
  1. ^ In the past it was used to, e.g., copy a deck of cards unrelated to a computer application.
  2. ^ Punch spoolers also supported banner cards.

References

[edit]
  1. ^ Lundin, Leigh; Stoneman, Don (1977). The Spooler User Guide (2 ed.). Harrisonburg: DataCorp of Virginia.
  2. ^ IBM 7070 SPOOL System, 7070 Data Processing System Bulletins (Second ed.), IBM, J28-6047-1
  3. ^ Donovan, John J. (1972). Systems Programming. p. 405. ISBN 0-07-085175-1.
  4. ^ James L. Peterson; Abraham Silberschatz (July 1984). "1.4.3 Spooling". Operating System Concepts. Addison-Wesley. p. 18. ISBN 0-201-06097-3.
  5. ^ Tanenbaum, Andrew S. Modern Operating Systems. 3rd Ed. Pearson Education, Inc., 2008. ISBN 978-0-13-600663-3
  6. ^ IBM System/360 and System/370 Asymmetric Multiprocessing System: General Information Manual, Program Number 360A-CX-15X, IBM, GH20-1173
  7. ^ The HASP System, February 26, 1971 HASP II (360D-05.1-014) V3M1, Version 3 Modification Level 1, IBM, February 26, 1971
  8. ^ z/OS V1R9.0 JES2 Introduction, IBM, SA22-7535-06
  9. ^ JES3 Overview (First ed.), IBM, December 1980, SC23-0040-0
  10. ^ DOS/VS POWER/VS Installation and Operations (PDF) (Second ed.), IBM, September 1974, GC33-5403-1
  11. ^ Virtual Storage Extended / Priority Output Writers, Execution Processors and Input Readers; VSE/POWER - 5686-CF9-03
  12. ^ CP-V Software: Concepts and Facilities Manual (PDF). Honeywell. 1976. p. 2-7. Retrieved December 6, 2023.