Skip to content
Related Articles

Related Articles

Improve Article

Difference between Buffering and Caching in OS

  • Last Updated : 26 Nov, 2020

Both the term buffering and caching is related to storage and then access of data, but there are some key difference that makes them different. First let’s see what both these term means and after that we will see the differences. 

1. Buffering : 
In computer system when the speed in which data is received and the speed in which data is processed are different, then there we use the buffer. Buffer is a memory space which stores the input data and pass it on to the system according to this speed in this way there is no need to hold the input device until it is processed. simply the data will be stored in buffer and the used by the system. The buffer can be of any type, hardware or software, but in general software buffer are used widely. 

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.


Example – In printers spoolers, we can pass a large no of pages to print as input, but the processing/printing is slow. Here buffering is used. 

2. Caching : 
Caching is storing data in a separate disk (very fast speed disk). The data which is to be used many times results in wastage of time if it is in hard disk, but storing the data in cache reduces this time wastage. 

Example – Cache is used in system to speed up the access of data frequently used. 

Difference between buffering and caching : 

BasicBuffer stores data till it is processedCaching fastens the data access speed of repeatedly used data
StorageBuffer stores original dataCache stores copy of the data.
LocationBuffer is a memory space in ramCache is in processor, and can be also implemented with ram and disk.
TypeBuffer can be hardware as well as software buffer.Cache is a fast disk and hence it is hardware.
PolicyFirst in First outLeast recently used
BehaviorBuffer is in block sizes like 4, 8, 16 so on, i.e, reading a single character will be same as reading the whole blockRead and write is same as the normal storage


My Personal Notes arrow_drop_up
Recommended Articles
Page :