Cache memory: Difference between revisions

From Computer Science Wiki
No edit summary
No edit summary
Line 3: Line 3:
Cache is very fast and small memory that is placed in between the CPU and the main memory.
Cache is very fast and small memory that is placed in between the CPU and the main memory.
Cache memory is used to reduce the average memory access times. This is done by storing the data that is frequently accessed in main memory addresses therefore allowing the CPU to access the data faster. This is due to the fact that cache memory can be read a lot faster than main memory. There are different types of cache (e.g. L1,L2 and L3)<ref>https://compsci2014.wikispaces.com/2.1.3+Explain+the+use+of+cache+memory</ref>
Cache memory is used to reduce the average memory access times. This is done by storing the data that is frequently accessed in main memory addresses therefore allowing the CPU to access the data faster. This is due to the fact that cache memory can be read a lot faster than main memory. There are different types of cache (e.g. L1,L2 and L3)<ref>https://compsci2014.wikispaces.com/2.1.3+Explain+the+use+of+cache+memory</ref>
The steps to access the data from cache memory are:
* A request is made by the CPU
* Cache is checked for data
* If the data is found in the cache it is returned to the CPU (this is called a cache hit)
* If the data is not found in the cache then the data will be returned from the main memory.
There is a wonderful analogy I found [https://www.quora.com/Computer-Architecture-What-is-the-L1-L2-L3-cache-of-a-microprocessor-and-how-does-it-affect-the-performance-of-it here]. If you are confused about cache memory, I suggest you read the top part of this story.


== Do you understand this topic? ==  
== Do you understand this topic? ==  


* Describe primary memory.
* Explain the use of cache memory


== Do you have an advanced understanding about this topic? ==
== Do you have an advanced understanding about this topic? ==


* Explain why investing in primary memory may provide better performance than secondary memory.
* List the differences between L1, L2, and L3 cache memoried?


== References ==
== References ==

Revision as of 12:12, 25 August 2016

This is a basic concept in computer science

Cache is very fast and small memory that is placed in between the CPU and the main memory. Cache memory is used to reduce the average memory access times. This is done by storing the data that is frequently accessed in main memory addresses therefore allowing the CPU to access the data faster. This is due to the fact that cache memory can be read a lot faster than main memory. There are different types of cache (e.g. L1,L2 and L3)[1]


The steps to access the data from cache memory are:

  • A request is made by the CPU
  • Cache is checked for data
  • If the data is found in the cache it is returned to the CPU (this is called a cache hit)
  • If the data is not found in the cache then the data will be returned from the main memory.

There is a wonderful analogy I found here. If you are confused about cache memory, I suggest you read the top part of this story.

Do you understand this topic?[edit]

  • Explain the use of cache memory

Do you have an advanced understanding about this topic?[edit]

  • List the differences between L1, L2, and L3 cache memoried?

References[edit]