What is spooling in Linux?

1 answer

Answer

1140673

2026-05-04 18:40

+ Follow

Spooling refers to a process of transfering data by placing it in temporary working area where

another program may access it for processing at a later point in time. 'Spool ' can refer to the

action of a storage device that incorporates a physical spool or reel, such as tape drive.

For eg:- A printer can serve only one job at a time, several applications may wish to print their

output concurrently, without having their output mixed together. The operating system solves

this problem by intercepting all output to the printer. Each applications's output is Spooled

to a separate disk file. When an application finishes printing, the spooling system queues the

corresponding spool file for output to the printer. The spooling system copies the queued spool

files to the printer one at a time.

In some operating system, spooling is managed by a system daemon process. In other operating

systems, it is handled by an in-kennel thread.

In either case, the operating system provides a control interface that enables users and system

administrators to display the queue, to remove unwanted jobs before those jobs print to suspend

printing while the printer is serviced, and so on.

Some devices, such as tape drives and printers, cannot usefully multiplex the I/O requests of

multiple concurrent applications. Spooling is one way that operating systems can coordinate

concurrent output. Another way to deal with concurrent device access is to provide explicit

facilities for coordination.

Some operating systems (including VMS) provide support for exclusive device access, by

enabling a process to allocate an idle device, and to deallocate that device when it is no longer

needed. Other operating systems enforce a limit of one open file handle to such a device.

Many operating systems provide functions that enable processes to coordinate exclusive access

among themselves. For instance, Windows NT provides system calls to wait until a device

object becomes available. It also has a parameter to the open () system call that declares the

types of access to be permitted to other concurrent threads. On these systems, it is up to the

applications to avoid deadlock.

THE SPOOLING MECHANISM

The entire key to spooling is a synchronous processing, where the program is not constrained by

the speed of slow devices, particularly printers.

Printers are relatively slow peripherals. In comparison, disc devices and particularly CPU's

are orders of magnitude faster. Without spooling print data, the speed of program operation

is constrained by the slowest device, commonly printers, forcing the program to wait for the

mechanical motion of the printer, the program is known as "print bound'.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.