retagged by
3,095 views
4 votes
4 votes
when 8-way set associative mapping  of cache memory is done and main memory size is 32 GB and Tag field has 10 bits. what will be the cache size ( consider, memory is byte addresable )
retagged by

4 Answers

4 votes
4 votes

Main memory size = 32 GB = 2^35 B (Byte addressbale) 

Size of physical address is = 35 bit 

Let x be the set offset, y be the word offset.

No. Of set = 2^x

No. of words in block = 2^y 

1 set = 8 blocks ( 8 way set associative ) 

2^x set contains = 2^x * 8 blocks = 2^(x+3) blocks

Cache size = No of blocks * No of words per blocks 

Cache size = 2^(x+3) * 2^y = 2^(x+y+3) 

Tag bits + x + y = 35 bit 

x + y = 35-10 = 25 bit 

Cache size = 2^(25+3) = 2^(28) B = 256 MB

Hence 256 MB is the answer

2 votes
2 votes

First Find the tag size in Direct mapped cache.In 8 way set associative it is of 10bits.So in direct mapped it is of 10-3=7bits.

This means main memory is 27  Times bigger than cache memory.

So cache size = 32GB÷128 =256MB

1 votes
1 votes

LA=35bits

tag=10

set=p  let the block size is 2x  then

word=x bits ...

total no blocks for MM=235-x

tag bits required=235-x  / 2p =235-x-p  =35-x-p=10 ->x+p=25

now cache size=8 22p =228 ->256MB

1 votes
1 votes

Main Memory is 32 GB which is 25 x  230 bytes which would need 35 bits.

lets assume set needs x bits and word size needs y bits to represent.

      TAG      SET      WORD SIZE
    10     x     y

Where 10+x+y=35
hence x+y=25

now ,

Total Cache size = (total no of sets) x (no of blocks in one set)  x  (word size ).

Total cache size = 2x x 8 x 2y

Total cache size = 2x+y x 8 = 225 x 8 = 256 MB.

No related questions found