
Introduction
As you know, computers when first introduced are too bulky, and with that, it takes too much time to perform small tasks like addition or any mathematical calculation. But with time and improvements, the computer becomes super fast. The one reason for being slow is they perform 1 task at a time, like taking an input is a task, processing the instruction is another task and showing the output of the result is the final task. But while taking input, the CPU becomes idle, so it cannot perform tasks because I/O (input or output) operations are resource-intensive tasks. To solve this dilemma Spooling and Buffering was introduced in the Also see, Operating System so that the CPU utilization increases.
In this article, we will study the concept of Spooling and buffering and the differences between them.
Let first get some idea of the concept of spooling and Buffering before looking at the difference between them.
Also read, Multiprogramming vs Multitasking And Open Source Operating System
Spooling in OS
Spooling is the process of temporarily storing data to be used and processed by a device, program, or system. Data is sent to and held in memory or other volatile storage until it is requested for execution by a program or computer.
SPOOL stands for simultaneous peripheral operations online. The spool is usually kept in the computer's physical memory, buffers, or interrupts for I/O devices. The FIFO (first-in, first-out) method is used to process the spool in ascending order.
How Spooling works
Spooling works in the following steps:
- Spooling is the process of creating a buffer called SPOOL that is used to hold tasks and data until the device that generated the SPOOL is ready to use and execute the job or perform data operations.
- Any secondary memory coupled to a faster device is used as a SPOOL buffer when it delivers data to a slower device to complete some action. This information is stored in the SPOOL until the slower device is ready to process it. The data in the SPOOL is loaded into the main memory for the appropriate operations once the slower device is ready.
- Spooling treats the entire secondary memory as a massive buffer that may hold a large number of jobs and data for a variety of activities. Spooling has the advantage of being able to build a queue of jobs that execute in FIFO order, one by one.
- A device can connect to a large number of input devices, each of which may require some data processing. As a result, all of these input devices can write their data to the secondary memory (SPOOL), which the device can subsequently process one by one. This will prevent the CPU from becoming idle at any moment. Spooling can thus be described as a hybrid of buffering and queuing.
- The output of the CPU is first saved in the main memory after it is generated. This output is moved from the main memory to the secondary memory, where it is transmitted to the appropriate output devices.

Example of Spooling
Printing is the most obvious example of spooling. The papers to be printed are stored in the SPOOL before being added to the printing queue. During this time, several programs can run and utilize the CPU without having to wait for the printer to complete the printing process on each paper individual









