GATE / CS ARCHIVE

GATE CSE 2014 SET 3 / QUESTION 44

GATE CSE 2014 Set 3 Q44

Computer Organization & Architecture · Cache Memory · Full GATE CSE 2014 Set 3 paper

GATE 2014 Set 3, Q44 2 marks · NAT
Report issue

Cache Memory

Question 44, GATE 2014: Cache access times are read hit 1 ns, read miss 5 ns, write hit 2 ns, write miss 10 ns. A sequence performs 100 instruction fetches, 60 operand reads and 40 operand writes. Cache hit ratio is stated as 0.9. Find mean memory-access time in ns.
Tap to enlarge
Answer & solution

Official answer: 1.68

Our answer: 1.68 if each access class has hit ratio 0.9

Step 1: Count instruction fetches as reads: there are 160 reads and 40 writes, 200 accesses total. Under the intended common hit ratio of 0.9 for each class, a read averages 0.9×1+0.1×5=1.4 ns, and a write averages 0.9×2+0.1×10=2.8 ns. Step 2: Weight by access count: (160×1.4+40×2.8)/200=1.68 ns. Miss times are given complete access times, not penalties to add again. Step 3: Preserve the ambiguity: an aggregate hit ratio alone only fixes 20 total misses. If w are write misses, read misses are 20−w and total time is 160+2×40+4(20−w)+8w=320+4w ns. Thus the mean can be 1.6+0.02w for 0≤w≤20, ranging from 1.6 to 2.0 ns. The official 1.68 assumes w=4 or the same hit ratio for both classes.

Original paper, page 63 · Answer key