GATE / CS ARCHIVE

GATE CSE 2010 / QUESTION 49

Main-memory refill through two cache levels

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

GATE 2010, Q49 2 marks · MCQ
Report issue

Cache Memory

Question 49, GATE 2010: An L1 cache connects to L2, which connects to main memory. Both connecting data buses are four words wide. L1 blocks contain four words; L2 blocks contain sixteen words. Access times are 2 ns for L1, 20 ns for L2 and 200 ns for main memory. On misses in both caches, a block is first transferred from main memory to L2, then a block from L2 to L1. What is the total transfer time?
Options: (A) 222 ns; (B) 888 ns; (C) 902 ns; (D) 968 ns.
Question 49, GATE 2010: An L1 cache connects to L2, which connects to main memory. Both connecting data buses are four words wide. L1 blocks contain four words; L2 blocks contain sixteen words. Access times are 2 ns for L1, 20 ns for L2 and 200 ns for main memory. On misses in both caches, a block is first transferred from main memory to L2, then a block from L2 to L1. What is the total transfer time?
Options: (A) 222 ns; (B) 888 ns; (C) 902 ns; (D) 968 ns.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

The L2 block has 16 words and the memory–L2 bus is 4 words wide, so filling it requires four transfers. Under the same non-overlapped read/write model as CS48, each costs 200 ns to read memory plus 20 ns to write L2: 4(200+20)=880 ns. The question says first fill L2, then transfer one 4-word block from L2 into L1, costing 20+2=22 ns. Total 902 ns, option C. No burst/pipelining/critical-word-first mechanism is specified; other timing models would require extra assumptions and are not used.

Keep the destination line size separate at each level: filling L2 moves sixteen words, hence four memory-bus transfers; filling L1 moves four words, hence one L2-bus transfer. The total is therefore 4×220+1×22, not four times the entire two-level path. The question explicitly orders the two fills, so their durations add in the model used.

Original paper, page 12