Ask Question
9 February, 15:35

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:

+2
Answers (1)
  1. 9 February, 19:07
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers