A CPU generates 32-bit addresses. The block size is 4 K Bytes. The processor has a Cache which can hold a total of 128 blocks and is 4-way set associative. The minimum size of the cache tag is:


A CPU generates 32-bit addresses. The block size is 4 K Bytes. The processor has a Cache which can hold a total of 128 blocks and is 4-way set associative. The minimum size of the cache tag is:

(A) 11 bits

(B) 13 bits

(C) 15 bits

(D) 20 bits

 

Explanation:

block = 4K bytes = 4 × 2^10 = 2^12.

So w = 12.

Cache size = 128 blocks = 2^7.

4-way set associative means, each set has 4 elements and the block corresponding to that block can fit any where in those. So,
no. of set = 128/4 = 2^5,

so u = 5. total size of main memory in blocks = 2^(32−12) = 2^20. So, s = 20. And
tag = s − u = 20 − 5 = 15 Ans. is (C)

Leave a comment

Your email address will not be published. Required fields are marked *