GATE Computer ScienceHardGATE CS (PYQ pattern)
A direct-mapped cache with 32-byte blocks and 32-bit addresses stores, for every line, only a tag and a valid bit as metadata. The total metadata is 18,432 bits. How many lines does the cache have?
- A. 4096
- B. 2048
- C. 512
- D. 1024
Correct answer: D. 1024
With L lines: tag = 32 − log₂L − 5 and metadata = L (tag + 1). For L = 1024: tag = 17, 1024 × 18 = 18,432. Neighbouring sizes give 512 × 19 = 9728 and 2048 × 17 = 34,816.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A loop computes y[i] += A[i][j] × x[j] for a 64×64 matrix of 4-byte floats (A in row-major order at address 0, x at 16384, y at 17024)…
- A 2²²-word memory uses a coincident (2-D) decoding scheme with a square cell array: one decoder selects the row, another the column. How…
- The IEEE 754 half-precision word 0xC4D0 (1 sign bit, 5 exponent bits with bias 15, 10 fraction bits) represents which value?
- A 16 KB, 4-way set-associative cache with 16-byte blocks uses 32-bit addresses. Its block size is doubled to 32 bytes and, at the same…
- A processor's logic takes 60 ns per instruction unpipelined. Split into k stages, the cycle time is 60/k + L ns (L = latch overhead) and…
- A DRAM controller uses an open-page policy: a row-buffer hit costs 15 ns and a miss 45 ns (precharge + activate + column). Under a…