Difference Between Buffering and Spooling

Buffering Vs. Spooling: In this tutorial, we will learn what is buffering and spooling, what are the key differences between buffering and spooling? By Monika Jha Last updated : May 08, 2023

To improve the system performance and efficiency of the computer by overlapping Input/output and processing there are two approaches: Buffering and Spooling.

What is Buffering?

In the main memory, buffer is a region which is used to store or hold the data temporarily that is being transmitted either between two devices or between a device or an application, it means buffer temporarily stores data that is being. The act of storing data or information for a shot time in the buffer is called buffering.

  • It is a technique of overlapping I/O and processing of single job. After data has been read and CPU is about to start operating on it the input devices are instructed to begin the next input immediately.
  • By the time that the CPU is ready for the next data item, the input device will have finished reading it.
  • The CPU can then begin processing the newly read data while input device start to read following data. Similarly, this can be done for O/P. In this case, CPU creates data that is put into a buffer until an output device can accept it.


For example, when we download a video or audio file, some part of the downloaded file is placed in the buffer and then played. When that clip is played, the device continuously downloads the file and places it into the buffer.

Uses of Buffering

  • It resolves the problem of speed mismatch between two devices, between which the data is transmitted.
  • Before sending or receiving it manipulates data. The large message is fragmented into the small fragments or packets and transmitted over the network. At the receiving end, these packets are accumulated in the buffer and reassembled to form the complete large message.
  • It also supports copy semantics that is the version of data in the buffer and at the time of system call both should be same is guaranteed to be the version of data at the time of system call irrespective of any change to data in the buffer.

What is Spooling?

It is the process in which jobs from the cars are read directly onto the disk and the location of that card in the disk is recorded in a table by the Operating System. When that job is required for execution, it is read from the disk.

Similarly, when the job requires a printer to output a line, that particular line is copied onto the disk and system buffer and after job, output is read from the disk and printed by the printer.

spooling in OS

Why it is called as Spooling (simultaneous peripheral operation online)?

By spooling more than one input and output devices can interact with disk simultaneously and provide an impression that these devices interact directly with CPU, so it is called simultaneous peripheral operation online.

Spooling increases the performance of system and also leads to multiprogramming. The specification for spooling are some disk space and some tables but it makes busy both the CPU and I/O devices as much as possible.

Difference Between Buffering and Spooling

The following are the key difference between buffering and spooling:

  1. Spooling can handle the I/O of one job as well as computation of another job at the same time while buffering handles I/O of one job along with its computation.
  2. Spooling is an acronym for Simultaneous Peripheral Operation online while buffering is not an acronym.
  3. Spooling is more efficient as it can overlap processing two jobs at a time but buffering is less efficient because it overlaps input/output of one job with the execution of the same job.
  4. Spool uses the disk as a huge buffer whereas buffer is a limited area in main memory.


Comments and Discussions!

Load comments ↻

Copyright © 2024 www.includehelp.com. All rights reserved.