Types of Cache Memory in a CPU

A Cache is used by the CPU to access data from the main memory in short time. It is a small and very fast temporary storage memory. It is designed to speed up the transfer of data or instructions. CPU Cache is located inside or near to the CPU chip. The data/instructions which are most recently or frequently used by the CPU are stored in CPU.  A copy of data/instructions is stored as a cache when the CPU uses them for the first time which retrieved from RAM. The next time when CPU needs the data/instruction, it looks in the cache. If the required data/instruction is found there, then it is retrieved from the cache memory instead of main memory.

Types/Levels of cache memory

A computer has several different levels of cache memory. All levels of cache memory are faster than the RAM. The cache which is closer to the CPU is always faster than the other levels but it costs more and stores less data than other levels. The types/levels of cache memory are explained below.

Types of Cache Memory in a CPU

Level 1 or L1 Cache Memory

The L1 cache memory is built on processor chip and it is very fast because it runs on the speed of the processor. It is also called primary or internal cache. It has less memory compared to other levels of cache and can store up to the 64kb cache memory. This cache is made of SRAM (Static RAM). Each time the processor requests information from memory, the cache controller on the chip uses special circuitry to first check if the memory data is already in the cache. If it is present, then the system is spared from the time-consuming access to the main memory.

Level 2 or L2 Cache Memory

The L2 cache memory is larger but slower than L1 cache. It is used to see recent accesses that are not picked by the L1 cache and it usually stores 64kb to the 2MB cache memory. An L2 cache is also found on the CPU. If L1 and L2 cache are used together, then the missing information that is not present in the L1 cache can be retrieved quickly from the L2 cache. Like L1 caches, L2 caches are composed of SRAM but they are larger. L2 is usually a separate static RAM (SRAM) chip and it is located between the CPU and DRAM (Main memory).

Level 3 or L3 Cache Memory

The L3 Cache memory is an enhanced form of memory present on the motherboard of the computer. It is an extra cache built into the motherboard between the processor and main memory to speed up the processing operations. It reduces the time gap between request and retrieving of the data and instructions much more quickly than the main memory. L3 cache is being used with processors nowadays, having more than 3MB of storage in it.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.