GATE / CS ARCHIVE

GATE CSE 2006 / QUESTION 74

Two-way cache hit latency

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

GATE 2006, Q74 2 marks · MCQ
Report issue

Cache Memory

Question 74, 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 two-way cache hit latency h₁.
Options:
(A) 2.4 ns
(B) 2.3 ns
(C) 1.8 ns
(D) 1.7 ns
Question 74, 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 two-way cache 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: A (no official key was published)

Step 1: 32 KB / 32 B=1024 cache lines. Two ways give 512 sets, so index=9 bits and block offset=5 bits.

Step 2: The tag is 32−9−5=18 bits. Two tag comparisons proceed in parallel, taking 18/10=1.8 ns; selecting the matching way adds 0.6 ns.

Step 3: Thus h1=2.4 ns, A, within the stated model that counts comparator and multiplexer latency.

Step 4: Teaching check: Two-way associativity halves the number of sets relative to direct mapping, increasing the tag by one bit. Both way tags are compared in parallel, so do not double comparator latency. The selected data then passes through one 2:1 multiplexer.

Original paper, page 11