Why Caching Works
Memory hierarchy exploits program locality
- Programs tend to reference parts of their address space that are local in
and
Temporal Locality
Recently referenced addressed are likely to be referenced again - reused
Spatial Locality
If a memory address is referenced, nearby addresses are likely to be referenced soon
- E.g. access to array
is likely to be followed by an access to