Cache Memory : Make it faster!
Ever wonder, how does your electronic devices run so much faster?
The answer to this question is 'cache memory'. Cache memory acts as a temporary store house between the processor and the main memory. Cache memory works on the principle of 'Locality Of Reference'. Now, there are two subtypes under LOR:
Spatial LOR - Whenever the processor demands for a new address, the main memory will send that address to the processor and moreover, it will send all the locally available (nearby) addresses as well to the cache memory in the form of a block. Now suppose the processor asks for another address and that address is present in the cache because it was in the block, then instead of going through the entire main memory which is quite large, that address can be fetched from the cache memory itself which is relatively way smaller in size. In this way, the searching time is reduced significantly and hence the speed is enhanced.
Temporal LOR - A demanded address can be demanded for multiple number of times by the processor. So instead of keeping it in the main memory, it is better to send that particular address to the cache memory. Again it will save a very decent amount of time while performing a task.
Remember, using a cache memory is advantageous because it is smaller in size. So the searching time is very less. There can be cases where the demanded address won't be there in the cache memory. So the processor will ultimately look into the main memory. But we are quite optimistic that in 90 out of 100 cases, the demanded address will be present in the cache memory and hence the cache memory will do its magic.
Thinking of adding many cache memory to your devices? Well, it is COSTLY. And while developing anything in the field of computer organization and architecture, time and money are two very important factors to be considered.
Hope this will add something to your knowledge and curiosity in the field of computer organization and architecture.
Subscribe to my newsletter
Read articles from Abhijeet Sinha directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by