1,030 views
0 votes
0 votes
Computer has 256KB 8 way set associative cache memory.The number of tag bits in its physical address format is 6 bits then size of the physical memory is __________mega bye

2 Answers

Best answer
2 votes
2 votes

Number of bits in physical memory, in case of set associative cache organisation is

Tag (6 bits) Set (y bits) Block size (x bits

Given Tag bits = 6 bit
Cache size = 256 KB
Number of lines every set contain = 8 (since its 8 way set associative)
Suppose Number of bits for block size is x, so block size will be 2x
Similarly Suppose Number of bits for set is y, so number of set will be 2y

Now we know, Cache size = Number of sets * Number of lines per set * Block size
i.e 218 = 2y * 23 * 2x
2x+y+3 = 218
x + y = 15 bits

Therefore to represent physical memory we need = 15 + 6 bits i.e 21 bits
So physical memory size will be 2 MB
 

selected by
0 votes
0 votes

Size of cache = 256 KB

1 set = 8 Block ( 8 way set associative)

Tag bits = 6 bits 

We know in set associative cache

Tag bits + set offset bits + word offset bits = physical address bits 

Let's take set offset = x ( means 2^x sets )

Word offset = y (means no of words in block are 2^y)

No.Of blocks in cache= 2^18/2^y = 2^(18-y)

No of sets = 2^(18-y)/8 = 2^(18-y-3)

No of bits in physical address = 6+18-y-3+y+6 = 21 bits

Size of main memory = 2^21 = 2MB

Hence 2MB should be the answer

Related questions

0 votes
0 votes
0 answers
3
mehul vaidya asked Jan 20, 2019
214 views
Doubling the associativity doubles the number of tags in the cache. Is this statement true or false . I have seen answer at https://gateoverflow.in/227782/cache-memory?sh...