1
$\begingroup$

I have googled a lot to find the answer and found some links like this, this and this and even in a book Understanding Computers Today and Tomorrow (13th edition) couple of paragraphs are written as given below:

Some input and output devices are exceedingly slow, compared to today’s CPUs. If the CPU had to wait for these slower devices to finish their work, the computer system would experience a horrendous bottleneck. For example, suppose a user sends a 100-page document to the printer. Assuming the printer can output 20 pages per minute, it would take 5 minutes for the document to finish printing. If the CPU had to wait for the print job to be completed before performing other tasks, the computer would be tied up for 5 minutes. To avoid this problem, most operating systems use two techniques—buffering and spooling. A buffer is an area in RAM or on the hard drive designated to hold input and output on their way in or out of the system. For instance, a keyboard buffer stores characters as they are entered via the keyboard, and a print buffer stores documents that are waiting to be printed. The process of placing items in a buffer so they can be retrieved by the appropriate device when needed is called spooling. The most common use of buffering and spooling is print spooling. Print spooling allows multiple documents to be sent to the printer at one time and to print, one after the other, in the background while the computer and user are performing other tasks. The documents waiting to be printed are said to be in a print queue, which designates the order the documents will be printed.

but I cannot clearly understand the difference between Buffering and Spooling.

Can anyone explain the difference between them in simple and easily understandable terms.

Also in couple of the links mentioned above, it is written as :

The main difference between buffering and spooling is that the latter allows the I/O of one job to overlap the computation of another. Buffering only allows the I/O of a job to overlap with its own computation.

so what is meant by overlapping the computation of own or other job?

[I don't know whether this is a proper place to ask this question or not, if not, then kindly tell where should I post this to get the answer]

$\endgroup$
  • $\begingroup$ quora.com/… Initially I was also confused but later I found a better solution. May be it help you.. $\endgroup$ – user41679 Oct 29 '15 at 3:42
2
$\begingroup$

There's not really a significant difference. Spooling uses buffering. Buffering can be used for other purposes, too.

The second quote you include in your question (I/O overlap, etc.) looks to me like it's not very helpful. The key question is whether you have one buffer per process (job) or a shared buffer that is common to all jobs. If you have one buffer per job, obviously they can overlap. If you have a single buffer for all the jobs, then if one job starts writing to it, other jobs might need to be locked out (depending upon how you implement the buffer).

Don't worry about these words. Memorizing the names and the terms "buffering" and "spooling" is not important. What's important is the concept: the idea of storing some data in a temporary space in memory, so that when the recipient is finally ready to use it, it's all there for them in one spot.

$\endgroup$
  • $\begingroup$ @ D.W.: Also somewhere it was written that "Spooling is better/faster than buffering". So can you explain how? $\endgroup$ – swdeveloper May 14 '15 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.