GATE / CS ARCHIVE

GATE CSE 2006 / QUESTION 75

Direct-mapped cache hit latency

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

GATE 2006, Q75 2 marks · MCQ
Report issue

Cache Memory

Question 75, GATE 2006: Compare two 32 KB caches with 32-byte blocks and 32-bit addresses: one is two-way set associative, the other direct mapped. A 2:1 multiplexer takes 0.6 ns; a k-bit comparator takes k/10 ns. The hit-latency model counts comparator and way-selection delays. Find direct-mapped hit latency h₂.
Options:
(A) 2.4 ns
(B) 2.3 ns
(C) 1.8 ns
(D) 1.7 ns
Question 75, GATE 2006: Compare two 32 KB caches with 32-byte blocks and 32-bit addresses: one is two-way set associative, the other direct mapped. A 2:1 multiplexer takes 0.6 ns; a k-bit comparator takes k/10 ns. The hit-latency model counts comparator and way-selection delays. Find direct-mapped hit latency h₂.
Options:
(A) 2.4 ns
(B) 2.3 ns
(C) 1.8 ns
(D) 1.7 ns
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. A direct-mapped 32 KB cache with 32-byte blocks has 1024 lines, requiring 10 index bits and 5 offset bits. The tag has 32−10−5=17 bits.

2. Its comparison takes 17/10=1.7 ns and no way-selection multiplexer is needed. Thus h2=1.7 ns, D, using the problem’s comparator/multiplexer-only timing model.

3. Teaching check: Direct mapping determines the only candidate line from the index bits, so no way selection is needed. There are 1024 lines rather than 512 sets, giving a 17-bit rather than 18-bit tag. The difference in hit time comes from both the tag size and the absent multiplexer.

Original paper, page 11