GATE / CS ARCHIVE

GATE CSE 2011 / QUESTION 43

Write-back direct-mapped cache metadata

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2011 paper

GATE 2011, Q43 2 marks · MCQ
Report issue

Cache Memory

Question 43, GATE 2011: An 8 KB direct-mapped write-back cache has 32-byte blocks and 32-bit byte addresses. Metadata per cache block contains one valid bit, one modified bit, and the minimum tag bits needed to identify the mapped memory block. How many metadata bits are needed in total?

(A) 4864
(B) 6144
(C) 6656
(D) 5376
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Step through it (8 steps)

There are 8192/32=256 cache lines, requiring 8 index bits. A 32-byte block requires 5 byte-offset bits, leaving 32−8−5=19 address-tag bits. Add one valid bit and one modified (dirty) bit per line: 21 bits per line. The metadata memory is therefore 256×21=5376 bits, option D. Data storage itself is not included.

Interpret 8 KB as 8×1024 bytes in the conventional cache model. The address splits into [19 tag bits][8 line-index bits][5 block-offset bits]. The index chooses one of the 256 lines, and the offset selects a byte within its 32-byte block. Only the tag must be stored as an address identifier; index and offset are implicit in placement. Write-back additionally needs the dirty bit to decide whether eviction must write data to memory, while valid distinguishes populated from unused entries.

Original paper, page 11 · Answer key