Large and Fast: Exploiting Memory Hierarchy: Topics To Be Covered
Large and Fast: Exploiting Memory Hierarchy: Topics To Be Covered
Topics to be covered
– Principle of locality
– Memory hierarchy
CPU
Memory hierarchy
consists of multiple
levels but data is Fastest Smallest Highest SRAM
Hit rate: The fraction of the memory access found in the cache.
Used as a measure of performance of the cache.
Miss penalty:
Time to replace a cache block with the corresponding
block from the lower level the time to deliver this block
to the processor
Accessing a Cache Location and
Identifying a Hit
We need to know
and
A cache memory block consists of the data bits, tag bits and
a valid (V)bit.
The index of a cache block and the tag contents of that
block uniquely specify the memory address of the word
contained in the cache block.
V bit is set only if the cache block has valid information.
Cache Memory
index V Tag Block address Data
0 0
1 1
2 Block (K words)
K-1
Block
length
(K words)
Word
length
CACHE CONCEPT
CPU
Word transfer
Cache
Block transfer
Main Memory
A Cache Example
Q. The series of memory address references given as word addresses are
22, 26, 22, 26, 16, 3, 16, and 18. Assume a direct-mapped cache with 8
one-word blocks that is initially empty. Label each reference in the list as a
hit or miss and show the contents of the cache after each reference.
Answer: