Ask Question

Assume that the 100,000 element integer array that you allocated starts at address 0x50000000 in memory, the size of an integer is 4 bytes and the D-cache is initially empty. As you read the integers in the array one-by-one, starting at index 0, how many D-cache misses will you see for reading the first 40 integers when the cache block size is (to be answered without running pin) : a) 4 bytes:b) 32 bytes:c) 64 bytes:

+4
Answers (1)
  1. 11 June, 17:46
    0
    40, 5 and 3

    See explaination for the details

    Explanation:

    A)

    Consider the data.

    Assume D-cache is empty

    An integer size = 4bytes

    The cache block size = 4bytes

    Therefore, the number of D-cache misses for reading the first 40 integers is,

    = (40*4) / 4

    = 160/4

    = 40

    b)

    Consider the data.

    Assume D-cache is empty

    An integer size = 4bytes

    The cache block size = 32bytes

    Therefore, the number of D-cache misses for reading the first 40 integers is,

    = (40*4) / 32

    = 160/32

    = 5

    c)

    Consider the data.

    Assume D-cache is empty

    An integer size = 4bytes

    The cache block size = 64bytes

    Therefore, the number of D-cache misses for reading the first 40 integers is,

    = (40*4) / 64

    = 160/64

    = 3
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Assume that the 100,000 element integer array that you allocated starts at address 0x50000000 in memory, the size of an integer is 4 bytes ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers