edited by
545 views
0 votes
0 votes
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
edited by

1 Answer

Best answer
1 votes
1 votes

Given CPU generated address length =  32

          Tag bits    =    16

          Block offset bits  =  log2 32  =  5

 So     set bits     =    32 - 16 - 5   =  11

          But no of cache blocks  =  256 K / 32   =   213

         So associativity    =   213 /  211

                                    =   4

Hence C) is the correct answer..Here nothing to be confused with valid bit etc as they are not generated by CPU ..They are a part of tag overhead which will be managed by cache controller..Just like a page table entry may contain valid/invalid,dirty bits but they are not part of CPU generated address similar is the case here.. 

selected by

No related questions found