Cache Memory – What really it is?

While Looking at the Processor specifications, you may go through Cache Memory. Here I present you what it is and how much important it is.

Cache memory is simply an ultra-fast and very small memory which is attached inside the processor itself, used to store some of the instructions and data which can be provided to the Processor without making it wait for the same, as processor is very fast device.

As we know, our processor is a digital device and operates on data and instructions very rapidly. A processor with 2GHz speed can execute 2,000,000,000 (2 Billion) instructions in a single second. For supplying data to the processor, we need a very fast memory. Our programs and instructions are stored on primary storage devices i.e. Hard Disks/ SSDs which are very slow and we can not use the processing power of the processor with these slow memory devices.

Here is how data and instructions are reached to the processor core from Primary Storage.

Flow diagram showing the flow of data from Storage to processor

We have a fast secondary memory called RAM or Random-Access Memory which are very much faster than the primary storage devices but still not enough speedy to supply the instructions to the processor that rapidly.

To use the full processing power of Processors, Cache Memory was invented. These are Ultra-Fast Memory which stores a small amount of data and instructions to provide them to processor without making it wait. Large cache memory can hold large amount of data, Obliviously!

Unlike Hard Disk, SSD and RAM, The cache memory is bundled inside the processor itself and cannot be modified without changing the processor.

Cache Memory are further divided into three parts as: L1 Cache, L2 Cache and L3 Cache

L1/Level1 Cache: L1 cache is the fastest and smallest cache memory and each core of the processor have its own L1 Cache memory divided into two parts as L1 Instructions and L1 data.

L1 instructions memory deals with the instructions to be executed whereas L1 data memory deals with the data to be executed upon. i.e. In the process of adding 0 and 1 (1+0), ‘+’ is the instruction whereas ‘0’ and ‘1’ is data.

L1 typically goes up to 256Kb and even 1Mb in powerful processors, i.e. Intel Xeon Processors.

Image showing 2 parts of L1 Cache, L2 and LLC
Image Courtesy: Crackware

L2/Level2 Cache: L2 cache memory comes in between L1 and L3 in terms of storage capacity and speed as well. Each CPU Core has its own L2 cache Memory i.e. It is not shared between multiple cores.

L2 cache varies somewhere between 256Kb to 8Mb.

L3/Level3/LLC Cache: L3, also called Last-level Cache has the largest storage capacity among all cache memory and slowest speed among all cache. It is shared between the cores. There is only one cache memory for the processor.

It takes input from RAM or Random Access Memory.

It ranges in between 4Mb to 50Mb.

Do You Know? Intel is experimenting on L4 cache to make the processing power of the processor faster.

Random Posts

Leave a Reply

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

*
*