Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ONLY PROBLEM NUMBER 2 Show all work, DO ONLY NUMBER 2 Consider the following ref

ID: 3533824 • Letter: O

Question



ONLY PROBLEM NUMBER 2




Show all work, DO ONLY NUMBER 2

Consider the following reference string given as WORD addresses: 1, 4, 8, 5, 20, 17, 19, 56, 9, 11, 4, 43, 5, 6, 9, 17. Assume a Direct-Mapped cache with 16 one-word block frames that is initially empty. When this reference string is processed, label each reference as a Hit or Miss, and pictorially show the state of cache as each word address is processed. The state of the cache at the end should be the final state after the last word is processed. Using the same reference string as in Problem 1, indicate the Hits and Misses and show the state of the cache after each address including the final content for a Direct-Mapped cache with 4-word block frames and a total cache size of 16 words.

Explanation / Answer

1: Miss. Words 0 - 3 transfered

4: Miss. Words 4 - 7

8: Miss. Words 8 - 11

5: Hit.

20: Miss. Words 20 - 23 transfered

17: Miss. Words 16 - 19 transfered

19: Hit.

56: Miss. Words 56 - 59 transfered

9: Miss. Words 8 - 11 transfered

11: Hit

4: Miss. Words 4 - 7 transfered

43: Miss. Words 40 - 43 transered

5: Hit.

6: Hit.

9: Miss. Words 8 - 11 transfered

17: Hit.

6 Hits.

Finally Cache contains:

Block 0: Words 16 - 19.

Block 1: Words 4 - 7

Block 2: Words 8 - 11

Block 3: Empty.