Computing Systems Final Flashcards
valid
Cache component that is set when the cache entry is being used
Tag
The memory address mapped to the entry
Hit ratio (h)
Percentage of accesses that hit the cache
Miss ratio (1 – h)
Percentage of access that miss the cache
Cache access time (c)
Time to access the cache (Both hit and miss)
Main memory access time (m)
Time to access main memory
Average memory latency
c + (1 – h) * m
How do you improve the average memory latency?
Increase hit rate
Decrease cache access time
Decrease memory access time
Principle of Spatial Locality
If we reference a memory location (e.g., 1000),
we are more likely to reference a location near it (e.g., 1001) than some random location
Examples of spatial locality in programs?
- Arrays
- Instructions (PC + 1)
cache blocks
store multiple words in a single cache line
write through
Store instructions write to both memory and the cache
Write policy disadvantage
cache and memory inconsistent
Write policy advantage
fewer stores to memory
write back
Only write the contents back to memory once cache block is evicted