GATE / CS ARCHIVE

GATE CSE 2017 SET 2 / QUESTION 45

GATE CSE 2017 Set 2 Q45

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2017 Set 2 paper

GATE 2017 Set 2, Q45 2 marks · NAT
Report issue

Cache Memory

Question 45, GATE 2017: I-cache read time/hit ratio:2 ns/0.8; D-cache:2 ns/0.9; shared L2:8 ns/0.9. Main-memory read time is 90 ns. Caches are direct mapped, use referred-word-first and write-back, and every dirty bit is 0. Of reads,60% fetch instructions and 40% fetch operands. Find average read time in ns to two decimals.
Tap to enlarge
Answer & solution

Official answer: 4.72

1. Compute the chance of reaching L2 by weighting the two L1 miss rates: 0.6(1-0.8)+0.4(1-0.9)=0.12+0.04=0.16. Every read first pays the 2 ns L1 lookup.

2. Conditional on an L1 miss, the L2 lookup adds 8 ns. Its local miss probability is 0.1, and such a miss adds 90 ns for memory. The expected additional time on an L1 miss is therefore 8+0.1·90=17 ns.

3. AMAT=2+0.16·17=4.72 ns. As a separate check, instruction reads average 2+0.2·17=5.4 ns and data reads 2+0.1·17=3.7 ns; 0.6·5.4+0.4·3.7=4.72. Clean blocks eliminate dirty write-back penalties, and referred-word-first permits the demanded read to finish without waiting for an unspecified whole-block transfer.

Original paper, page 18 · Answer key