What is caching?
Cache is a type of memory that is used to increase the speed of data access. Normally, the data required for any process resides in the main memory. However, it is transferred to the cache memory temporarily if it is used frequently enough. The process of storing and accessing data from a cache is known as caching.
Uncached System vs Cached System
A figure to better understand the difference between cached and uncached system is as follows −
Some important points to explain the above figureare −
- In an uncached system, there is no cache memory. So, all the data required by the processor during execution is obtained from main memory. This is a comparatively time consuming process.
- In contrast to this, a cached system contains a cache memory. Any data required by the processor is searched in the cache memory first. If it is not available there then main memory is searched. The cache system yields faster results than the uncached system because cache is much faster than main memory.
Advantages of Cache Memory
Some of the advantages of cache memory are as follows −
- Cache memory is faster than main memory as it is located on the processor chip itself. Its speed is comparable to the processor registers and so frequently required data is stored in the cache memory.
- The memory access time is considerably less for cache memory as it is quite fast. This leads to faster execution of any process.
- The cache memory can store data temporarily as long as it is frequently required. After the use of any data has ended, it can be removed from the cache and replaced by new data from the main memory.
Disadvantages of Cache Memory
Some of the disadvantages of cache memory are as follows −
- Since the cache memory is quite fast, it is extremely useful in any computer system. However, it is also quite expensive and so is used judiciously.
- The cache is memory expensive as observed from the previous point. Also, it is located directly on the processor chip. Because of these reasons, it has a limited capacity and is much smaller than main memory.
Published on 16-Aug-2018 13:34:04