GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 1.22

Two-way set-associative mapping

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

GATE 1999, Q1.22 1 mark · MCQ
Report issue

Cache Memory

Question 1.22, GATE 1999: Main memory has 2cm blocks and cache has 2c blocks, with two blocks per set. Which set receives block k: k mod m,c,2c,or 2cm?
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

The number of cache sets is capacity divided by associativity: (2c)/2=c. Consecutive main-memory blocks are distributed cyclically over these c sets, so the set index is k mod c. The remaining quotient supplies tag information, while either way within that indexed set may hold the block. Thus B. The paper display products 2cm and 2c, not exponents; reading the latter as 2c would change the set-count formula incorrectly.

Original paper, page 3