What is Cache Memory? Explained in Easy Way


Cache Memory Explained


Memory has a very important role in our computers, laptops, and smartphones. In fact, without memory, any processor-based device could not be run. If you do not know about electronics then you will face problems to know about Cache Memory. But don't worry I'll try to convince you about Cache Memory very easily. So let's know What is Cache Memory? Types of Cache Memory. Importance of Cache Memory.

Day by day technology is getting better and processors on our computers, laptops, and smartphones also getting better. Modern processors perform very fast. We know that memory is required for the operation of the processor so memory should be work fast. If the memory works slow then the processor could not work fast.






So, before we understand cache memory, let's see the different kinds of memory that we see inside our computers, laptops, and smartphones.

Our computer has three types of  memory
  1. Data Storage memory like Hard Disk.
  2. RAM.
  3. Cache memory.





computer memory types, memory types, types of memory in computer, cache memory, Random Access Memory(RAM), Hard Disk


Hard Disk:


The first kind of memory that we find inside our computer is the non-volatile kind of memory like a hard disk drive.
This hard disk drive contains a mechanically rotating disk. The typical rotating speed of the disk is either 5400 or 7200 RPM. As this hard disk drive contains a mechanically rotating part, so in terms of the speed, they are quite slow.

The typical read or write speed that you get with this hard disk drive is in the range of 80 to 150 MBPS. But if you see the clock speed of the CPU, it is in the range of 1GHz up to 4 GHz. So, even though the processor is capable of accepting a data much higher speed, but it can't get the data through this hard disk drive at the same rate.


Random Access Memory(RAM):


So we need a fast memory. To overcome this problem the second kind of memory comes which is Random Access Memory(RAM). Random Access Memory is faster compared to the hard disk drive and RAM can provide data to the CPU at a much faster rate compared to the Hard disk drive.

But in modern days processors which we are using is not the single core processor but they are multicore processors(dual-core, quad-core, or maybe even octa-core). If all the cores are asking for data at the same time, then this RAM can't be able to deliver the data to all the cores at the same time. To overcome this problem The Cache Memory comes. Cache memory is the fastest among all memories.

Cache Memory:


The Cache memory is also Random Access Memory but it is a special kind of RAM, which is known as Static RAM(SRAM). Unlike the Dynamic RAM, which we find inside the normal RAM, this static RAM is quite fast. And the typical size of this cache memory is in the range of KiloBytes up to a few MegaBytes. So, the data which is frequently required by the CPU can be supplied by this cache memory. Generally, some instructions and data which is required by the CPU are stored in this cache memory.

Now let's know the different types of the cache memory. There are three types of cache Memory,


  1. Level 1 Cache Memory.
  2. Level 2 Cache Memory.
  3. Level 3 Cache Memory.


Level 1 Cache Memory:


The level 1 cache memory is a tiny amount of memory that is integrated inside the CPU itself. All the cores inside the CPU have their individual level 1 cache memory. As this level 1 cache memory is integrated inside the CPU, so it can operate at the same speed as the CPU. The Level 1 cache memory is the fastest among all cache memories. Generally, this Level 1 cache memory is made by Registers.
The typical memory size of this level 1 cache memory is 2KB up to the 64 KB.





computer memory types, memory types, types of memory in computer, cache memory, Random Access Memory(RAM), Hard Disk





Level 2 Cache Memory:


The level 2 cache memory could be either inside the CPU or it could be outside the CPU. Most of the cases the level 2 cache memory is installed inside the CPU. This level 2 cache memory could be separate for all the cores or it could be shared between all cores of the CPU. If the level 2 cache memory is outside the CPU, then it is connected to a very high-speed bus with the CPU.
The memory size of this level 2 cache memory is in the range of 256 KB to the 512 KB.


Level 3 Cache Memory:


All the processors do not have this level 3 cache memory, some higher-end processors have this level 3 cache memory. This level 3 cache memories are used to enhance the performance of the level 1 and level 2 cache memories. This level 3 cache memory is shared among all cores of the CPU and it is outside of the CPU.
The memory size of this level 3 cache memory is in the range of 1 MB up to the 8 MB.




How CPU take data from Cache Memory?


Whenever the CPU needs some data then, first of all, it will look inside the L1 cache memory. If it does not find inside the L1 cache memory then it will look inside the L2 cache memory. And if data is not inside the L2 cache memory then it will look into the L3 cache. If the CPU finds the data inside the cache memory then it is known as a cache hit. But if data is not available inside the cache then it is known as a cache miss. Suppose if data is not available in the L3 cache, the CPU will look inside the Random Access Memory or RAM. And still, if it doesn't find any data inside the RAM then it will get that data from the Hard Disk Drive.

So, when you are starting your computer for the first time or you are opening some application for the first time, then that data will not be available in either cache memory or in RAM. So, at that time CPU will get that data from the hard disk drive. But, once the application is open and then after if it requires some data then the CPU will get that data from either RAM or cache memory.


Why Cache Memory have a low Size?


Now, you may ask that if this cache memory is so fast then why the size of this cache memory is only in MegaBytes. The reason is that this cache memory is much costlier than the other memories. And that is the reason you find only a few MegaBytes of cache memory inside the CPU.


Thank you for visiting the website. keep visiting for more updates.
What is Cache Memory? Explained in Easy Way What is Cache Memory? Explained in Easy Way Reviewed by Author on November 17, 2018 Rating: 5
Powered by Blogger.