Cache
Learn about cache memory by implementing a simulation cache complete with cache reads, writes, replacement policies, and associativity.
StartKey Concepts
Review core concepts you need to learn to master this subject
Memory Hierarchy
Memory Hierarchy
A memory hierarchy organizes different forms of computer memory based on performance. Memory performance decreases and capacity increases for each level down the hierarchy.
Cache memory is placed in the middle of the hierarchy to bridge the processor-memory performance gap.
Cache
Lesson 1 of 1
- 1It’s a nice day out today and you have decided to work in your garden. However, you realize you don’t have any fertilizer so you go to the garden store to pick some up. Getting the fertilizer tak…
- 2What is a memory hierarchy and why is it important? Let’s answer the second part of that question by looking at the graph below: ![Performance gap of processors and memory](https://static-assets…
- 3Cache memory can hold more data than the processor but less than main memory. Its size means data retrieval is slower than that within the processor but is faster than that from main memory. Cach…
- 5When the data requested from the processor is not in the cache, a cache miss occurs:
The above …
- 6What happens when the cache is full and a cache miss occurs? The incoming data will need to replace an existing entry in the cache. But, which entry? The decision about which populated entry will …
- 7Up until now, data from the main memory has been placed in any block of the cache. What if each location in the main memory can be placed in specific cache blocks? Associating memory locations to s…
- 8So what about writing to memory? When the processor writes data to memory it is always written to cache. Just like a cache read, the memory address is searched within the tags of the cache entrie…
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory