Subscribe by Email


Wednesday, May 8, 2013

Explain the concept of Spooling and Buffering?


Concept of Spooling

- In the field of computer science, the ‘simultaneous peripheral operations on – line’ has been shortened down to the acronym ‘spool’. 
- A SPOOL software such as that of the IBM’s ‘SPOOL system’ was used by the computer systems in the time period from late 1950 to early 1960. 
- From one medium to another, files could be copied using this software. For example:
  1. From tape to punch card
  2. From punch card to tape
  3. From tape to printer
  4. From one card to another card
- IBM released less expensive software called the IBM 1401 that from some time brought down the application of the spool software.
- The print spooling is the most common application of this concept.
- The documents to be printed are formatted and stored at an area of the disk and retrieved when the print command is given.
- The printer prints out these documents at its defined rate. 
- Typically, at a time only one document can be printed by a printer and for doing so it takes a few minutes or seconds depending up on how fast it is. 
Spooling speeds up this process, but how? 
- With a spool software many documents can be written to the print queue by the multiple processes without having to wait. 
- As soon as the process wrote its document in the spooling device, it was free to carry out the other tasks. 
- At the same time another process would handle the printing of the document. 
If there was no spooling, the processor would not be able to continue until and unless the pending process is finished. 
- This would lead to long waits during processing and thus making the paradigm inefficient.

Concept of Buffering

- The physical memory storage has a region where it temporarily stores the data when it is being sent to another location.
- Typically whenever data is taken from some input device such as a keyboard or a mouse, it is stored in the buffer before sending it to the processor or output device. 
- Buffers can be implemented either through some virtual data buffer or in a fixed memory location.
- In majority of the cases, implementation of buffers is done with software that point to some location in the physical memory and use faster RAM. 
- The data access from buffers is quite fast when compared to that of the hard disk drives. 
- Buffers are used wherever a difference occurs between the rate of receiving data and rate of processing it.
- It also occurs if the two data rates are variable such as in online video streaming, printer spooler and so on. 
- The timing in a buffer is adjusted with the implementation of a FIFO algorithm or we can say a queue in the memory. 
- This would allow at the same time to write the data at the one end and read it from another end and both being done at different rates.
- Buffers are used along with I/O to hardware like in transmitting and receiving data in a network, disk drives, playing some song on the speakers etc.
- Buffers used in telecommunication are called the telecommunication buffers and make use of a storage medium or buffer routine.
- This routine compensates for the two different rates while receiving and sending data. 
- Buffers are also used in making interconnections between digital circuits working at different rates, for making timing corrections, delaying transmission time and so on. 


No comments:

Facebook activity