Direct Mapping : 1. Many to One Relation and Direct Formula (Block Number % Number of Cache Lines) -> One Comparison. 2. P.A. Bit Split - Tag Bits, Line Number and Block / Line Offset. 3. Less Search Time because of One Comparison. Drawback - Conflict Miss Associative Mapping : 1. Many to Many Relation and No Direct Formula -> Many Comparisons. 2. P.A. Bit Split - Tag Bits / Block Number and Block / Line Offset. 3. More Search Time because of Many Comparisons. Drawback - No clue where a particular block will be placed inside the Cache, there is hardware price for judging all the tag bits.
Hi Rajesh....I think by Search Time you mean to say Hit Latency....I think search time will be similar for both of the cases, only OR gate is getting added for Associative Mapping which may increase the Hit Latency for the associative mapping little extra addition to the nbit comparator as no of Tag bits are more here. Thank you for your comparison.
In second question We can calculate cache size using the formula No of tag bits = log to the base 2 of (MM size/cache size) And then we can calculate cache line and tag directory size Is this correct sir ??
we have tag feild size =20 then no.of tag bits =log2(MM size/chache size), then log2 comes this side 2^no.of tag bits=MM size/cache size 2^20=2^34/cache size cache size=2^34/2^20 cache size=2^(34-20) cache size=2^14=16384 tag directory size=16384 * 20= 327680 in bytes=327680/8=40960 Bytes then tag directory size = 40960 Bytes is this correct sir.
Wrong... You can't multiply with the cache size in tag directory.. you need to multiple with the cache lines.. So it's wrong.. Tag directory becomes 20 bits only
Direct Mapping :
1. Many to One Relation and Direct Formula (Block Number % Number of Cache Lines) -> One Comparison.
2. P.A. Bit Split - Tag Bits, Line Number and Block / Line Offset.
3. Less Search Time because of One Comparison.
Drawback - Conflict Miss
Associative Mapping :
1. Many to Many Relation and No Direct Formula -> Many Comparisons.
2. P.A. Bit Split - Tag Bits / Block Number and Block / Line Offset.
3. More Search Time because of Many Comparisons.
Drawback - No clue where a particular block will be placed inside the Cache, there is hardware price for judging all the tag bits.
Hi Rajesh....I think by Search Time you mean to say Hit Latency....I think search time will be similar for both of the cases, only OR gate is getting added for Associative Mapping which may increase the Hit Latency for the associative mapping little extra addition to the nbit comparator as no of Tag bits are more here. Thank you for your comparison.
@@kaushik5572 Yes ! Search time is Hit Latency here.
Thank you so much sir this is very helpful
Thank you sir
In second question
We can calculate cache size using the formula
No of tag bits = log to the base 2 of (MM size/cache size)
And then we can calculate cache line and tag directory size
Is this correct sir ??
same question
I think your formula works only for Direct Mapping
You're the best.
we have tag feild size =20 then
no.of tag bits =log2(MM size/chache size), then log2 comes this side
2^no.of tag bits=MM size/cache size
2^20=2^34/cache size
cache size=2^34/2^20
cache size=2^(34-20)
cache size=2^14=16384
tag directory size=16384 * 20= 327680
in bytes=327680/8=40960 Bytes
then tag directory size = 40960 Bytes
is this correct sir.
Wrong... You can't multiply with the cache size in tag directory.. you need to multiple with the cache lines.. So it's wrong.. Tag directory becomes 20 bits only
Thanks so much
እናመሰናለን
😊
please upload the videos a little faster and it'll be really helpful if covered control unit design topic as well.
Please forgive me, I spoke bad about you in my mind. Please forgive ❤ कृपया मुझे क्षमा करें, मैंने मन में आपके बारे में बुरा कहा। कृपया क्षमा करें ❤