485 views
0 votes
0 votes
if in a question it ask for cache capacity the is it calculated by follwing...

cache capacity=cache size+ tag memory size+dirty bit

cache capacity=tag bits * no. of cache lines

which one is correct?

1 Answer

2 votes
2 votes

Cache Capacity = Number of lines $\times$ Bytes/Words per Line

Now what you are asking is Size of Cache tag directory,

Each Block/Line contains tag whether it is associative, direct or set-associative mapped cache. 

Hence, Size of Cache tag directory = Tag Bits $\times$ Number of Lines(Blocks)

If the question mentions that there are some extra information(valid, modified or replacement bits) along with tag then,

Size of Cache tag directory = (Tag Bits + Valid bits + Modified bits + Replacement Bits)  $\times$ Number of  Lines

 

 

Related questions

0 votes
0 votes
0 answers
1
Mk Utkarsh asked Sep 12, 2018
979 views
Consider a 4 - way set associative cache with 'L' blocks of 16 words each. Cache block is associated with dirty bit field and valid bit field. Calculate cache capacity wi...
1 votes
1 votes
1 answer
2
$ourav asked May 18, 2016
2,435 views
Consider a 8 million word physical memory and 256 block cache, both partitioned into 64 word blocks.Find the tag memory required for cache memory for the following mappin...