Home » Operating Systems » Operating systems miscellaneous » Question

Operating systems miscellaneous

Direction: A computer has a 256 kbyte. 4-way set associative, write back data cache with block size of 32 byte. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bit, 1 modified bit and 1 replacement bit.

  1. The number of bits in the tag field of an address is
    1. 11
    2. 14
    3. 16
    4. 27
Correct Option: C

Number of blocks in the cache (c) =
Cache size
=
256
= 213
Block size32

Number of blocks in main memory (m) =
Main memory size
=
232B
= 227
Block size32B

Number of blocks in each set (S) = 4
Number of tag bits = log m – log c + log S = 27 – 13 + 4 = 16 bit



Your comments will be displayed only after manual approval.