Question
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 _______.
Official answer and solution
- Official answer
- 13.5
- From
- Official GATE 2020 answer key
Solution
Compute the miss penalty by summing the time for the first word and subsequent words of the block, then apply the AMAT formula.
Given parameters:
- Cache hit time
- Hit rate Miss rate
- Block size = 256 bytes
- Word size = 64 bits = 8 bytes
- Words per cache block =
Miss penalty calculation:
- First word retrieval time =
- Remaining words take each
- Total miss penalty :
Average Memory Access Time (AMAT):
13.5
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2020 Computer Science and Information Technology (CS)
- Question
- 31 of 65, printed as CS Q.21
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.