What is the difference between spooling, buffering and caching in OS?
Spooling: Simultaneous peripheral operation online, an acronym for this is Spooling. A spool is a kind of buffer that holds the jobs for a device till the device is ready to accept the job. Spooling considers disk as a huge buffer that can store as many jobs for the device till the output devices are ready to accept them.
Buffering: The buffer is an area in the main memory that is used to store or hold the data temporarily that is being transmitted either between two devices or between a device or an application. In simple words, buffer temporarily stores data that is being transmitted from one place to another. The act of storing data temporarily in the buffer is called buffering.Buffering helps in matching the speed between the sender and receiver of the data stream. If the sender’s transmission speed is slower than receiver, then a buffer is created in main memory of the receiver, and it accumulates the bytes received from the sender.
Caching: Cache is a memory implemented in the processor that stores the copy of original data. The idea behind caching is that the recently accessed disk blocks must be stored in the cache memory so that when the user again needs to access the same disk blocks, it can be handled locally through cache memory avoiding the network traffic.
Spooling vs Buffering
- The key difference between spooling and buffering is that Spooling can handle the I/O of one job along with the computation of an another job at the same time while buffering handles I/O of one job along with its computation.
- The buffer is a limited area in main memory while Spool uses the disk as a huge buffer.
Buffering vs Caching
- The key difference between buffer and cache is that buffer memory is used to cope up with the different speed between sender and receiver of the data stream whereas, the cache is a memory which stores the data so that access speed can be fastened for repeatedly used data.
- The buffer always carries the original data to be sent to the receiver. However, cache carries the copy of original data.
Comments
Post a Comment