Friday, September 3, 2021

Cache Memory | Different Memory Mapping Technique

      What is Cache Memory?

Small section of SRAM added between processor and main memory to speed up execution process is known as cache memory. Cache memory is a special high-speed memory. It is buffer between CPU and Main Memory.

It helps to increase the processing speed of CPU to provide data of program which is currently in execution mode. A cache memory system includes a small amount of fast memory (SRAM) and a large amount of slow memory (DRAM).

 

Figure: Cache Memory System

Cache controller implements the cache logic. If processor finds the address or data in cache, but it is not available in cache – the condition referred to as cache miss, the desired memory block is copied from main memory to cache using cache controller.

The cache controller decides which memory block should be moved in or out of the cache and in or out of main memory, based on the requirement. The percentage of accesses where the processor finds the code or data it needs in the cache memory is called the hit ratio/hit rate.


Why Cache Memory is needed?

The speed of the CPU is generally faster than main memory's speed.

This results in slowdown in processing speed of the CPU as main memory is not able to provide data and instruction as per CPU's processing rate.

So, add one small and high-speed cache memory placed between CPU and main memory. 

Cache memory access time is almost close to CPU cycle time. Thus, cache memory helps in increasing the performance of the computer.

Cache memory stores the portion of programs currently getting executed in CPU and any temporary data needed for computation. 

It acts as a buffer between CPU and main memory. This is the reason cache memory is important and highly needed.


Characteristics:

High processing speed.

Costly compare to primary and secondary memory.

Less storage capacity compares to primary and secondary memory.

Cache memory operation is based on 'locality of reference' property.


Cache Memory Mapping Technique



Click here to watch video of Cache Memory

Watch more videos click here.

No comments:

Post a Comment