Memory Hierarchy Cheat Sheet

In the Computer System Design, Memory Hierarchy is an enhancement to organize the memory such that it can minimize the access time. The Memory Hierarchy was developed based on a program behavior known as locality of references same data or nearby data is likely to be accessed again and again. The figure below clearly demonstrates the different levels of the memory hierarchy.

Cache and Memory Hierarchy Cheat Sheet Principle of Locality - Programs access a small proportion of their address space at a given time. Temporal Locality - Items accessed recently are likely to be accessed again soon Spatial Locality - Items near those accessed recently are likely to be accessed soon The Four Cache Questions

Fast Exploiting Memory Hierarchy 9 Characteristics of the Memory Hierarchy Increasing distance from the processor in access time Inclusive- what is in L1 is a subset of what is in L2 is a subset of what is in MM that is a subset of is in SM L1 L2 Main Memory Secondary Memory Processor Relative size of the memory at each level 4-8

6.004 Worksheet - 1 of 11 - Memory Hierarchy amp Caches Keep the most often-used data in a small, fast SRAM often local to CPU chip. The reason this strategy works LOCALITY. Locality of reference Access to address X at time t implies that access to address XX at time tt becomes more probable as X and t approach zero.

Make cache a hash-like structure Performance is better than linear search Make cache a hardware hash table! The hash function takes memory addresses as inputs Each hash entry contains a block of data caches operate on quotblocksquot cache blocks are a power of 2 in size. Contains multiple words of memory usually between 16B-128Bs Hit requested data is in the table

The gap between CPU and main memory speed is widening. Well-written programs tend to exhibit good locality. nThese properties complement each other well for many types of programs. nThey suggest an approach for organizing memory and storage systems known as a memory hierarchy.

Memory Hierarchies Introduction Memory Hierarchy Cache Cache Mapping Prefetching Conclusion Writing into Cache If data to be written out already resides in cache, a write hit occurs. There are several possibilities for handling this case, but usually outermost caches work with a write-back strategy The cache line is modi ed in cache and

Memory Cheat Sheet by sophie_malby - Cheatography.com Created Date 20240706084740Z

Cache memory Direct Mapping function is the level of memory hierarchy closest to the CPU refer to diagram in notes. It acts as a buffer Each memory block in the cache can only be mapped to one block address, the cache has different addresses within it. Easy to implement but most expensive out of all three mapping methods

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.