• retagged by
4,530 views
4 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 )

4 Answers

4 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 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 1 vote

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 * 2x * 2p =228 ->256MB

1 1 vote

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.

Position:
Show:

Related questions

77 77 votes
9 answers 9 answers
41.3k
41.3k views
Kathleen asked Sep 13, 2014
41,331 views
The access times of the main memory and the Cache memory, in a computer system, are $500$ n sec and $50$ nsec, respectively. It is estimated that $80\%$ of the main memor...
1 1 vote
1 1 answer
146
146 views
DΛΞMON asked Sep 28
146 views
$\begin{array}{l}\textbf{Q. } \text{A processor has the cache hierarchy as given. Assume that 20\% of instructions are}\\\text{load/store instructions. The remaining 80\%...
2 2 votes
1 1 answer
186
186 views
naveendewangan asked Aug 2
186 views
Assume 15% of L1 misses are resolved in the victim cache. If retrieving data from the victim cache takes 4 cycles and retrieving data from main memory take 50 cycles, by ...