Memory Hierarchy Q.37

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. A50 × 50 two-dimensional array of bytes is stored in the main memory starting from memory location 1100 H. 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 access.

0. How many data cache misses will occur in total?

  • Option : C
  • Explanation : Size of main memory = 216 bytes
    Size of cache = 32 * 64 Bytes = 211 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
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *