Professional Documents
Culture Documents
Lec 4
Lec 4
Direct
Associative
Set associative
Mapping Functions
s–r
s
W4j
w Li
W(4j+1) Bj
Compare w
W(4j+2)
W(4j+3)
(hit in cache)
1 if match
0 if no match
Lm–1
0 if match
1 if no match
(miss in cache)
w Lj
s
W4j
W(4j+1)
Compare w Bj
W(4j+2)
W(4j+3)
(hit in cache)
1 if match
0 if no match
s
Lm–1
0 if match
1 if no match
(miss in cache)
Set 0
s–d Fk–1
Fk s+w
Bj
0 if match
1 if no match
(miss in cache)
First-in-First-out (FIFO)
Random
Write police
Write back
❑Write to memory when replace
❑Each line have DIRTY bit
Write through
❑Write to memory & cache