
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Assigned Question # 4 (a) Since each element = 8 - byte, here has 64 - byte / 8 - byte = 8 elements Minimum size of the cache = ( elements in matrix + elements out of matrix ) x bytes per element
(2) Unblocked version: one cache miss for every 64 - byte / 8 - byte = 8 row elements each column requires 64-byte x 256 = 16 KB of storage, and column elements will be replaced in the cache before they can be used again Thus, in the unblocked version, it will have 1 row and 8 columns =
(c) Here we make an extension from simple loop and demonstrate below: for (i=0; i<256; i=i+B) { for (j=0; j<256; j=j+B) { for (m=0; m<B; m++) { for (n=0; n<B; n++) { output[j+n][i+m] = input[i+m][j+n]; } } } } (d) Since blocks in a direct-mapped cache could be allocated, so that they map to overlapping regions in the cache.