Write a short note on Cache Memory.

The speed of CPU is extremely high compared to the access time of main memory. Therefore, the performance of CPU decreases due to the slow speed of main memory. To minimise the mismatch in operating speed, a small memory chip is attached between CPU and main memory whose access time is very close to the processing speed of CPU. It is called Cache memory. Cache memories are accessed much faster than conventional RAM. It is used to store programs or data currently being executed or temporary data frequently used by the CPU. It is also very expensive to have larger size of cache memory.

Main memory access by the CPU may take as long as 180 ns. However, it may take 45 ns to access external cache memory or, even less for internal (Level 1) or on-board (Level 2) cache. While the CPU is processing information retrieved from cache, the cache controller is refreshing cache with data and instructions from main memory or a storage device.

There are two categories of cache memory: Internal and External.

In older CPUs, and even in some current CPUs, internal cache memory is located in the CPU, and external is located on the motherboard between the RAM and the CPU. It is often called ‘cache RAM’. Internal Cache memory is often called “level 1” or L1 cache. External cache is often called “level 2” or L2 cache.

L2 Cache may be on-board (in the CPU chip) or in Static RAM (SRAM) chips on the motherboard. External cache acts as a quick access buffer between the RAM and L1 cache in the CPU. L2 Cache RAM is a small block of high-speed memory, usually SRAM (Static RAM), located between the CPU and main memory. It is used to store data or instructions that are used often. There are several types of SRAM having a speed of 4-8 ns.

Leave a Reply

Your email address will not be published. Required fields are marked *