What is the use of Cache Memory?
Hello Friends, in this blog post(What is the use of Cache Memory) I am going to explain to you cache memory, which is related to programming. We will cover the use and working procedure of cache memory.
In this blog post(What is the use of Cache Memory), we will explore Why do we use cache memory. What are the 3 types of cache memory? How does cache memory work? What are cache memory and its types?
It is very simple to understand the concept of cache memory, you can easily learn this with the help few real-life examples related to cache memory(What is the use of Cache Memory).
if we take a real-life banking example, when we go to a bank we usually get withdrawal and deposit vouchers on the desk as they are most frequently used the whole day in the bank, so if the bank assigns a resource for doing this then it will be a burden on a bank in terms of time and money both|What is the use of Cache Memory|
Whereas NEFT voucher is not kept usually at the common desk in the bank as they are rarely used for a whole day.
So in a similar fashion to programming, if the active portion of the program and data are placed in fast small memory, the average memory access time can be reduced, thus reducing the total execution time of the program. Such a fast small memory is called cache memory.
it is placed between the CPU and main memory, as shown in Fig 1 below. The cache memory access time is less than the access time of the memory. by a factor of 5 to 10. The cache is the fastest component in the memory hierarchy and approaches the speed of CPU components.
The fundamental idea of the organization is that by keeping the most frequently accessed instructions and data in the fast cache memory, the average memory access time will approach the access time of the cache.
Although the cache is only a small fraction of the size of the main memory, a large fraction of memory requests will be found in the fast cache memory because of the locality of the reference property of programs.
The basic operation of the cache is as follows. When the CPU needs to access memory, the cache is examined. If the word is found in the cache, it is read from the fast memory.
If the word addressed by the CPU is not found in the cache, the main memory is accessed to read the word. A block of words containing just one accessed is then transferred from the main memory to the cache memory.
The block size may vary from one word to 16 words adjacent to the one just accessed. In this way, some data are transferred to the cache so that future references to memory find the required words in the fast cache memory.
Quick revision:
Why do we use cache memory?
Cache memory is used to reduce the time of access to a data request. Cache memory is so fast, that it is a buffer between RAM and CPU.
Whenever the CPU needs data in the memory then it easily accesses it from the cache. The most frequently used data are kept in the cache memory.
What are the 3 types of cache memory?
There are three types of cache memory L1, L2, and L3. L1 is generally built within the processor chips. L2 is the occasional part of the CPU but it is often a separate chip between the RAM and CPU. L2 and L3 are larger caches than the L1 but take longer to access.
How does cache memory work?
As we know RAM is slightly slow and far from the CPU, so a cache is memory that is built somewhere in between the RAM and CPU to store the data, information, and programs.
And whenever the CPU needs the data it looks into the cache for faster access. The most frequently used data are kept in the cache memory.
What are cache memory and its types?
Cache memory is small and faster memory that is built to provide the frequently used data information and programs to the CPU. This saves lots of time on data access.
There are two types of cache memory, memory caching(cache store, memory buffer, RAM cache), and another is disk cache. memory cache is an area made up of high-speed static RAM(SRAM) instead of a cheaper and slower dynamic RAM(DRAM).
You can also go through a few more amazing blog links below related to operating systems:
disk scheduling क्या होती है…
FAT32 Advantages and Disadvantages…
Overlay advantages and disadvantages in programs…
What is the use of Cache Memory…
What is Linker? Why is it required?…
types Of File Operations…
What are the file Organisation and its types…
Dijkstra: Bankers Algorithm For Deadlock Avoidance…
What is a thread in the operating system with an example…
Cache Memory In Hindi…
Linker In Hindi…
What Are Multithreading Models in Hindi…
Dynamic Storage Problem In OS In Hindi…
Process states in the Operating system in Hindi…
FAT32 Advantages And Disadvantages In Hindi…
Critical Section Problem With a Simple Example…
Critical Section Problem In OS In Hindi…
Dijkstra Algorithm In Hindi|Banker’s Algorithm In Hindi…
What Is Dynamic Storage Problem…
What are the Fork and Exec system calls…
Multithreaded Process: Benefits & Models…
The Process States In Operating System…
In the case of any queries, you can write to us at a5theorys@gmail.com we will get back to you ASAP|What is the use of Cache Memory|
Hope! you would have enjoyed this post about What is the use of Cache Memory.
Please feel free to give your important feedback in the comment section below|What is the use of Cache Memory|
Have a great time! Sayonara!