GATE | GATE-CS-2007 | Question 80
Consider a machine with a byte addressable main memory of 216 bytes. Assume that a direct mapped data cache consisting of 32 lines of 64 bytes each is used in the system. A 50 × 50 two-dimensional array of bytes is stored in the main memory starting from memory location 1100H. Assume that the data cache is initially empty. The complete array is accessed twice. Assume that the contents of the data cache do not change in between the two accesses.
How many data cache misses will occur in total?
Explanation: Size of main memory=216 bytes
Size of cache=32*64 Bytes
=2 11 Bytes
Size of array=2500 Bytes
Array is stored in main memory but cache will be empty
Size of cache=2048 Bytes
So number of page faults=2500-2048=452
Complete array will be access twice
So for second access no. of total page faults=452*2=904
So total page faults=452+904=1356
So data cache misses will be 56
So (C) is correct option
Quiz of this Question
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.