Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
=30*10-9 sec.
= 30 nsec.
= 8*1024*30 nsec.
=245760 nsec.
= 0.996
P.2
0
1
0
1
2 Set #0
3
60
61
62 Set #15
16K -1 63
Main Cache
a) xxxxxxxxxxxxxxxxxxxx
b) xxxxxxxxxxxxxxxxxxxx
Cache address = 0 0 0 1 1 1 0 0 0 0 1 0
P.3
a) Direct
0 2 4 6 2 8 2 0 4 2
0 0 4 4 4 8 8 0 4 4
0 2 2 6 2 2 2 2 2 2
M M M M M M H M M H h=2/10=0.2
b) Full Assoc.&FIFO
0 2 4 6 2 8 2 0 4 2
0 0 0 0 0 8 8 8 8 8
2 2 2 2 2 2 0 0 0
4 4 4 4 4 4 4 2
6 6 6 6 6 6 6
M M M M H M H M H M h=3/10=0.3
c) Full Assoc.&LRU
0 2 4 6 2 8 2 0 4 2
0 0 0 0 0 8 8 8 8 8
2 2 2 2 2 2 2 2 2
4 4 4 4 4 0 0 0
6 6 6 6 6 4 4
M M M M H M H M M H h=3/10=0.3
d) Full Assoc.&Optimum
0 2 4 6 2 8 2 0 4 2
0 0 0 0 0 0 0 0 0 0
2 2 2 2 2 2 2 2 2
4 4 4 4 4 4 4 4
6 6 8 8 8 8 8
M M M M H M H H H H h=5/10=0.5
e) Set Assoc.(set size=2) & FIFO
0 2 4 6 2 8 2 0 4 2
0 0 4 4 2 2 2 0 0 2
2 2 6 6 8 8 8 4 4
M M M M M M H M M M h=1/10=0.1
M M M M M M H M M M h=1/10=0.1
M M M M H M H M M H h=3/10=0.3
h)Conclusion:
For this particular pattern “Direct Mapping” and “Set-Associative Mapping” are no
good(Only half of the cache is utilized).LRU and FIFO makes no difference in “Full
Associative Mapping” and the “Optimum Mapping” provides the best hit ratio (h=0.5)