retagged by
1,489 views

2 Answers

Best answer
2 votes
2 votes

Actually the significance of tag is 

How many blocks of main memory are mapped to same set of cache memory just like in case of direct mapping how many blocks of main memory gets mapped to a line(block) of cache memory..

So having said that ,

No of lines in cache given = 16

Associativity  i.e.  k  =  4

So no of sets   =  No of lines in cache / k

                      = 16 / 4

                      =  4

But there are 64 blocks of main memory in total..

Hence no of blocks that will map to same set  = No of blocks in main memory / No of sets

                                                                   =  64 / 4

                                                                   = 16

So no of tag bits as mentioned earlier the significance of tag  =  log216

                                                                                         =  4

Hence D) should be the correct option..

selected by
1 votes
1 votes

For direct mapped: TAG+ INDEX+  WORD-OFFSET = (2+4 (16 cache blocks)) 64 BLOCKS + X

Tag INDEX WR-OFF
2 4 x

for 4-way set associative

16/4 =4 sets 

Tag index wr-offset
4 2 x

so 4 is ans

Related questions

0 votes
0 votes
1 answer
3
Mrityudoot asked Jun 5, 2023
650 views
In a 2 level hierarchy, the cache has an access time of 15 ns and the main memory has an access time of 110 ns, the hit rate of the cache is 90%. If the block size of the...
0 votes
0 votes
1 answer
4