33 views
Which of the following statements are true?

S1: Doubling the line size halves the number of tags in the cache.

S2 : Doubling the associativity increases the number of tags in the cache.

S3 : Doubling the line size usually reduce compulsory misses.

How to approach such kind of question?
ago | 33 views
0
S3?
+1

S1: Doubling the line size halves the number of tags in the cache.

If we double the line size, then the number of lines in a block will decrease (exactly half, assuming the cache size remains constant), as number of lines get halved the number of tags will also get halved.

S2 : Doubling the (set) associativity increases the number of tags in the cache.

If we double the set associativity, the number of sets will decrease, hence the bits required for number of bits will decrease, block offset remains the same, so tag bits will increase but number of tags remains same.

Doubling the line size usually reduce compulsory misses.

The more number of lines in a cache, the more the compulsory misses. Doubling line size will half the number of lines, so cumpulsory misses decrease.

S1 & S3 should be correct.

0
Actually answer provided by ME says all are correct
+1
Since number of tag bits are increasing, number of distinct tags will also increase( $2^t$), right? why would they remain same?
+1
no of tag depends on the no of block/line and no of block/line depend on The block/line size.

In S2 as the block size are not changing so the no of block remain same and so do the tag.

.changing associativity will only increase/decrease the no of set(index bits) i.e., how we group those blocks
0
@Sahil91 is right, changing associativity should have no effect on the number of tags.
0
is it not same as number of tag bits are increasing ? Lets say earlier we had 1K cache lines and 4-way associate, and let number of bits for tag and block offset be x and y respectively. Now we increase the associativity to 8 and y(block offset) does not change, so number of tag bits must change.
+1
Yes tag bits changed but the number of tags remains the same, a cache line has a tag associated with it so we can check which main memory word is stored in that line, number of bits for tag and actual number of tags are unrelated.