Before going into the types of Cache memory, I want to define what is a Cache memory in brief if you don’t know about it. It’s an inbuilt memory or RAM in a Processor used in a computer that is used for carrying out tasks which require the Processor to store useful information about the tasks to be carried out. It is literally a form of RAM which is used in the motherboard but as the processor can access it faster, therefore the system applications open faster.
This type of memory is different from the storage which you use to store files and every CPU has it inbuilt. CPU stores the information from Register in it so that it can use it again quickly. If you have ever noticed that when you open your computer and start a program 1st time, and then close it and start it the 2nd time, it always takes less time. It’s because of the information that was temporarily stored in the Cache memory.
Types of Cache Memory in a CPU
There are three types of cache memory found in a CPU:-
1. L1 Cache
2. L2 Cache
3. L3 Cache
These cache memories are very fast and store the temporary information of the programs which have been opened because of the probability that these programs will be opened again. So, instead of going and accessing the information from the system RAM which is much slower than the Cache memory, the Cache memory stores it for the future purpose.
L1 cache is the fastest cache memory and is generally smaller in size. From 2KB to 1.5MB(Latest processors like Threadripper 1950X come with 1.5MB L1 Cache) but it is the main cache memory which is used first by the CPU if the information is stored here. If the CPU can’t find the information, it will go and search it in the lower level cache memory which is the L2 Cache memory. Its size is bigger ranging from 256KB to 8MB but it’s also slower.
If the information can not be found in this cache too, then CPU will search in the L3 Cache memory which is much bigger ranging from 1MB to 32MB. These sizes vary from generation to generation and high-end processors come with higher Cache to make processing fast.