in CO and Architecture
1,380 views
1 vote
1 vote

What is the size of tag in cache directory for direct and set-associative memory?

For set-associative memory do we multiply by no of sets or no of blocks?

According to me

Size of Tag in cache directory = Number of tag bits(+ any extra bits like valid, modified etc) * number of blocks

OR

Size of Tag in cache directory = Number of tag bits(+ any extra bits like valid, modified etc) * number of sets

Tag is associated with each block or set?

in CO and Architecture
1.4k views

4 Comments

Tag is associated with each block or set?

each block

For of them them, Size of Tag in cache directory = Number of tag bits(+ any extra bits like valid, modified etc) * number of blocks

0
0
In set associative , aren't we wasting memory by duplicating tag value for all blocks in the same set ?

Also , if possible, plz provide any resource related to cache tag directory .
0
0

If we had to identify a set by associating it with tag then what is the use of set bits?

A set can have many memory blocks mapped to it..out of which only k blocks can reside at a time(for k-way set associative cache mapping).

To identify a particular memory block whether it is in cache or not we divide the physical address into parts. The set bits are used to identify to which particular set can the block belong if the block is really in the cache.

After finding the set now we have to check through the k-cache lines in that set. This is done by comparing the tag bits of our block with the tag bits of the blocks already residing in that set.

You can watch this :

https://www.youtube.com/watch?v=PjzDNTppraQ&list=PLEbnTDJUr_IdI9QZ7bkrhMX2ZpNW0dZUo&index=4

He mentioned about the tag directory size from 1:30

2
2
Thank you
0
0

Please log in or register to answer this question.