Cache memory
Cache (pronounced cash) memory is extremely fast memory that is built into a computer’s central processing unit (CPU), or located next to it on a separate chip. The CPU uses cache memory to store instructions that are repeatedly required to run programs, improving overall system speed.

The cache is a smaller, faster memory which stores copies of the data from the most frequently used main memory (RAM) locations. As long as most memory accesses are to cached memory locations, the average latency of memory accesses will be closer to the cache latency than to the latency of main memory (RAM).

As it happens, once most programs are open and running, they use very few resources. When these resources are kept in cache, programs can operate more quickly and efficiently.cache is so effective in system performance that a computer running a fast CPU with little cache can have lower benchmarks than a system running a somewhat slower CPU with more cache. Cache built into the CPU itself is referred to as Level 1 (L1) cache. Cache that resides on a separate chip next to the CPU is called Level 2 (L2) cache. Some CPUs have both L1 and L2 cache built-in and designate the separate cache chip as Level 3 (L3) cache.


The program and data is loaded from the hard drive into RAM. From RAM it is loaded into cache RAM, and from there it is executed by theCPU.Hard drives are very slow compared to the CPU.  RAM is much faster than a hard drive, but still 4-5 times slower than your CPU. Cache RAM is extremely fast--it is capable of  delivering data at or near the speed of the CPU.Cache RAM and normal RAM are very similar in the way they work.  Cache isjust extremly fast, and expensive.That is why there is so very little of cache RAM available--it is expensive.


When the processor needs to read from a location in main memory (RAM), it first checks whether a copy of that data is in the cache. If so, the processor immediately reads from  the cache, which is much faster than reading from main memory . If the cache doesn’t have that data, the processor is halted while it is loaded from main memory into the cache.
                                              CACHE READ OPERATION






Most modern desktop and server CPUs have at least three independent caches: an instruction cache to speed up executable instruction fetch, a data cache to speed up data fetch and store, and a translation lookaside buffer used to speed up virtual-to-physical address translation for both executable instructions and data.
0 Responses