The cache is the set of data that is duplicated and formed from other original data, as accessing original data is often time-sensitive.
What is Processor/CPU Cache Memory?
When data is accessed for the first time, a copy of the data is created in the cache and the corresponding copies are accessed, reducing the average access time.
Cache Memory is a memory where a series of data is stored for fast access, and basically, a processor’s cache is a kind of temporary memory like RAM, but much faster than RAM hardware.
This memory is integrated into the processor and its purpose is to store a series of instructions and data that the processor continuously accesses so that these accesses are instantaneous.
These instructions and data are information that the processor must constantly access, so for the performance of the processor, it is essential that this access be as fast and fluid as possible.
Because the cache is much smaller than the main memory, it is not possible to store all the data of an existing program in it. Therefore, the microprocessor only stores the data it needs to use most often and sends the rest of the data to the RAM memory.
As a result, when the microprocessor first accesses the data, it creates a copy of certain data in its cache, so when it needs to read that data again, it searches the cache before searching the RAM. This process provides further performance gains.
Processor Cache Types
L1 (Level Cache 1)
This cache is integrated into the processor core and runs at the same speed as it. The amount of L1 cache varies from one CPU to another and is normally between 64KB and 256KB.
This memory is usually divided into two special parts, one for instructions and one for data.
L2 (Level Cache 2)
The L2 is integrated into the processor, although not directly in the processor core, and has the same benefits as the L1, although it is slightly slower than that.
The L2 is usually larger than the L1 and can have a value of 2MB or more.
Unlike the L1, it is not fragmented and its use is directed towards programs installed and running on your computer rather than the system.
L3 (Level Cache 3)
It’s a type of cache memory that’s less used on the CPU and slower than L2.
Initially, this cache was placed on the motherboard, not the CPU, and the access speed was much higher than the RAM. Although it was a much faster memory, it was significantly slower than the L1 and L2.
This slow transmission depends on the communication between the processor and the motherboard.
Caches are extremely fast and their speed is about 5 times faster than the speed of one of the high-performance RAMs. In addition, there is an added advantage that there is no latency in the cache space, so there is no delay in their access, but they are a very expensive type of memory.
This, coupled with direct core integration to the processor, does not limit the size sufficiently, but on the one hand, makes the processor more expensive.
On the one hand, there are variants that are typically used by Intel and whose total L2 is accessible for both cores, and on the other hand, AMD has its own L2 for each core reserved only for that core.
The L2 first appeared on the Intel Pentium Pro and was later included in the Intel Pentium II.