The Gateway to Computer Science Excellence
+1 vote
73 views
A computer has a 256 KB, K-way set associative write-back data cache with block size of 32 B. The address sent to the cache controller by the processor is of 32 bits. In addition to the address tag, each cache tag directory contains 2 valid bits and 1 modified bit. If 16 bits are used to address tag. What is the minimum value of K?

A) 6

B) 5

C) 4

D) None of these
in CO and Architecture by (297 points)
edited by | 73 views
+1
It should be option C.

Total lines = $\frac{2^{18}}{2^5}= 2^{13}$

Let x is set number.

Now whole address is of 32 bits out of which 16 + x  + 5 (tagbits + set number + offset)

Hence x = 11 i.e $2^{11}$ sets will be there.

Hence k = $\frac{2^{13}}{2^{11}} = 4$
0
Yes 4 way set way associative is right..
0
Sir, my confusion is that should we always consider that these three bits (2 valid bits and 1 modified bit) are included in address tag ? Since the question is saying "In addition to the address tag, each cache tag directory contains 2 valid bits and 1 modified bit" i thought these three bits are additional to the address tag bits.

Please clarify my doubt.
0
Actually you can't exceed the virtual address range...it's given 32 bits therefore you have to fit extra bits in that range only..
0

Got it..sir

This question (https://gateoverflow.in/2192/gate2012-54) is also helpful.

Please log in or register to answer this question.

Related questions

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
50,737 questions
57,391 answers
198,591 comments
105,442 users