




























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth look into the concepts of memory hierarchy, locality of reference, and cache design. It covers various topics such as levels in memory hierarchy, cache organization, caching principles, and cache implementation. The document also includes examples and simulations to help students understand the concepts.
Typology: Slides
1 / 36
This page cannot be seen from the preview
Don't miss anything!





























class18.ppt
diskDisk diskDisk
Memory-I/O bus
Processor
Cache
Memory
controller
controller
controller
Display Network
interrupt
Microprocessor Report 9/12/
L1 data L1 instruction L2 unified TLB Branch history
L1 data L1 instruction L2 unified TLB Branch history
Right Half L
Right Half L
L I n s t r.
L Data
L Tags
L3 Control
Big, Slow Memory
Small, Fast Cache A B G H
Processor
Initial A B C D
Read C A B C D
Read D Read Z
Cache holds 2 blocks Each with 2 words
Load block C+D into cache “Cache miss”
Word already in cache “Cache hit”
Load block Y+Z into cache Evict oldest entry
n-bit Physical Address t s b
tag set index offset
Selected Set:
t s b
tag set index offset Physical Address
N=16 byte addresses B=2 bytes/block S=4 sets E= entry/set Address trace (reads): 0 [0000] 1 [0001] 13 [1101] 8 [1000] 0 [0000] 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
x
t=1 s=2 b= xx x
1 0 m[1] m[0]
v tag data
0 [0000] (miss)
1 0 m[1] m[0]
v tag data
1 1 m[13] m[12]
13 [1101] (miss)
1 1 m[9] m[8]
v tag data
8 [1000] (miss)
1 0 m[1] m[0]
v tag data
1 1 m[13] m[12]
0 [0000] (miss)
tag
31 30 29 .................. 19 18 17 16 15 14 13 .................. 5 4 3 2 1 0 set (^) offsetbyte
valid tag (16 bits) data (32 bits)
data
hit
16,384 sets
Cache Block
x[1]
x[0]
x[1020]
x[3]
x[2]
x[1021] x[1022] x[1023]
y[1]
y[0]
y[1020]
y[3]
y[2]
y[1021] y[1022] y[1023]
Cache Block
Cache Block
Cache Block
Cache Block
Cache Block
Cache Block
x[1]
x[0]
x[3]
x[2]
y[1]
y[0]
y[3]
y[2]
Cache Block