The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

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

+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 2^{x}

Similarly Suppose Number of bits for set is y, so number of set will be 2^{y}

Now we know, Cache size = Number of sets * Number of lines per set * Block size

i.e 2^{18} = 2^{y} * 2^{3} * 2^{x}

2^{x+y+3} = 2^{18}

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

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**

- All categories
- General Aptitude 1.3k
- Engineering Mathematics 5.4k
- Digital Logic 2.1k
- Programming & DS 3.8k
- Algorithms 3.3k
- Theory of Computation 4.1k
- Compiler Design 1.6k
- Databases 3k
- CO & Architecture 2.6k
- Computer Networks 3k
- Non GATE 1.1k
- Others 1.4k
- Admissions 494
- Exam Queries 442
- Tier 1 Placement Questions 19
- Job Queries 59
- Projects 9

37,056 questions

44,636 answers

126,999 comments

43,686 users