The GATE Grind

GATE 2020 CS – Question 31

Computer Organization and Architecture · Memory Interfacing and Hierarchy · 1 mark · Numerical answer

A direct mapped cache memory of 1 MB has a block size of 256 bytes. The cache has an access time of 3 ns and a hit rate of 94%. During a cache miss, it takes 20 ns to bring the first word of a block from the main memory, while each subsequent word takes 5 ns. The word size is 64 bits. The average memory access time in ns (round off to 1 decimal place) is ______.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 13.3 to 13.5

Explanation

A block has 256/8 = 32 words, so the miss penalty is 20+31×5 = 175 ns. AMAT = 0.94×3 + 0.06×175 = 13.32 ≈ 13.3 ns. Counting the cache access on a miss too gives 13.5 ns. The official key accepts 13.3 or 13.5.