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

Computer Architechture class question:Memory hierarchy For a 64-Kbyte. 2-way set

ID: 3764702 • Letter: C

Question

Computer Architechture class question:Memory hierarchy

For a 64-Kbyte. 2-way set associative cache, calculate the cache miss rate for the following loop. Make the following assumptions: There is no entry in the cache initially; Integers are 4 bytes long and two-dimensional arrays are stored in row-major order. Partially credit may be awarded, if intermediate results are shown int array[32][1024]; // An integer array with 32 rows and 1024 columns for (int i = 0; i less than 32; i++) { for (int j = 0: j

Explanation / Answer

(a)

Cache Miss Rate for 32-byte cache blocks is 2.87%

(b)

Cache Miss Rate for 16-byte cache blocks is 3.94%

(c)

Cache Specification:

Cache size = 64 KB

Block size = 16 B

2 - way set associative

Number of cache blocks = 64 KB/16 B = 4 K = 212 blocks

Number of words in a cache block = 16 B/1 B = 16 = 24 words

Number of sets in cache = 2^12 / 2 = 211 sets

Size of virtual address = 32 bits

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote