Subscribe by Email


Showing posts with label Buffers. Show all posts
Showing posts with label Buffers. Show all posts

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. 


Monday, December 21, 2009

Difference between buffer and cache ?

A buffer is a region of memory used to temporarily hold output or input data.Buffers can be implemented in either hardware or software, but the vast majority of buffers are implemented in software. Buffers are used when there is a difference between the rate at which data is received and the rate at which it can be processed.

The terms "buffer" and "cache" are not mutually exclusive and the functions are frequently combined; however, there is a difference in intent. A buffer is a temporary memory location, that is traditionally used because CPU instructions cannot directly address data stored in peripheral devices. Thus, addressable memory is used as intermediate stage.

Additionally such a buffer may be feasible when a large block of data is assembled or disassembled (as required by a storage device), or when data may be delivered in a different order than that in which it is produced. Also a whole buffer of data is usually transferred sequentially (for example to hard disk), so buffering itself sometimes increases transfer performance. These benefits are present even if the buffered data are written to the buffer once and read from the buffer once.

A cache also increases transfer performance. A part of the increase similarly comes from the possibility that multiple small transfers will combine into one large block. But the main performance-gain occurs because there is a good chance that the same datum will be read from cache multiple times, or that written data will soon be read. A cache's sole purpose is to reduce accesses to the underlying slower storage. Cache is also usually an abstraction layer that is designed to be invisible from the perspective of neighboring layers.


Friday, December 4, 2009

Concept of Buffers

In computing, a buffer is a region of memory used to temporarily hold data while it is being moved from one place to another. Typically, the data is stored in a buffer as it is retrieved from an input device (such as a keyboard) or just before it is sent to an output device (such as a printer). However, a buffer may be used when moving data between processes within a computer.
Buffering is used to improve several other areas of computer performance as well. Most hard disks use a buffer to enable more efficient access to the data on the disk. Video cards send images to a buffer before they are displayed on the screen (known as a screen buffer). Computer programs use buffers to store data while they are running. If it were not for buffers, computers would run a lot less efficiently and we would be waiting around a lot more.
Buffers are another way that receivers can ensure that they do not miss any data sent to them. Buffers can also be useful on the transmit side, where they can enable applications to work more efficiently by storing data to be sent as the link is available.
The buffers may be in hardware, software, or both. When the hardware buffers aren't large enough, a PC may also use software buffers, which are programmable in size and may be as large as system memory permits. The port's software driver transfers data between the software and hardware buffers.
In micro controllers, the buffers tend to be much smaller, and some chips have no hardware buffers at all. The smaller the buffers, the more important it is to use other techniques to ensure that no data is missed.


Facebook activity