Question

An 8KB direct-mapped write-back cache is organized as multiple blocks, each of size 32-bytes. The processor generates 32-bit addresses. The cache controller maintains the tag information for each cache block comprising of the following.

  • 1 Valid bit
  • 1 Modified bit
  • As many bits as the minimum needed to identify the memory block mapped in the cache.

What is the total size of memory needed at the cache controller to store meta-data (tags) for the cache?

Choose one option
Official answer and solution
Official answer
D
From
Official GATE 2011 answer key

Solution

Determine the address bit breakdown and total meta-data storage in bits for the direct-mapped cache controller.

  1. Cache capacity = 8 KB = 2132^{13} bytes. Block size = 32 bytes = 252^5 bytes.
  • Block offset bits = 55 bits.
  1. Number of cache lines:
Lines=8192 bytes32 bytes=256=28 lines\text{Lines} = \frac{8192\text{ bytes}}{32\text{ bytes}} = 256 = 2^8\text{ lines}
  • Index bits = 88 bits.
  1. Tag bits per line in a 32-bit address:
Tag bits=32−Index−Offset=32−8−5=19 bits\text{Tag bits} = 32 - \text{Index} - \text{Offset} = 32 - 8 - 5 = 19\text{ bits}
  1. Meta-data bits per cache line:
Bits per line=1 (valid bit)+1 (modified bit)+19 (tag bits)=21 bits\text{Bits per line} = 1\text{ (valid bit)} + 1\text{ (modified bit)} + 19\text{ (tag bits)} = 21\text{ bits}
  1. Total meta-data memory for all 256 lines:
Total Meta-data=256×21 bits=5376 bits\text{Total Meta-data} = 256 \times 21\text{ bits} = 5376\text{ bits}
Final answer

D

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2011 Computer Science and Information Technology (CS)
Question
43 of 65, printed as CS Q.43
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.