The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
56 views
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
asked in CO & Architecture by Veteran (11.5k points) | 56 views
2MB ??

how ???

isnt memory size / cache size = 2 tagbits ?

 

2 Answers

+1 vote
Best answer

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
 

answered by Boss (6.6k points)
selected by
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

answered by Boss (6.6k points)

yes got it @ashwini @stblue

i want to know if this is correct

memory size /  cache size = 2tagbits



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

29,006 questions
36,838 answers
91,329 comments
34,718 users