What is Cache Memory? Explained in Easy Way-You never forget.

Cache Memory Explained


Memory has a very important role in our computer, 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 going better and processor on our computer, laptop, and smartphone also going better. Modern processors perform very fastly. We know that memory is required for operation of the processor so memory should be work fastly. If the memory works slow then the processor could not work fast.






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

Our computer has three type 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 the 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 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 the 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 which is integrated inside the CPU itself. All the cores inside CPU have their individual level 1 cache memory. As this level 1 cache memory integrated inside the CPU, so they can operate at the same speed of the CPU. The Level 1 cache memory is 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 are 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 with 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 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 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 CPU will get that data from either RAM or cache memory.


Why Cache Memory has 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-You never forget. What is Cache Memory? Explained in Easy Way-You never forget. Reviewed by Author on 21:15 Rating: 5
Powered by Blogger.