Question: Determine the cache performance for the following code that runs in 2048-byte direct- mapped data cache with 32-byte blocks (B = 32). You are given
Determine the cache performance for the following code that runs in 2048-byte direct- mapped data cache with 32-byte blocks (B = 32). You are given the following definitions:
struct point_color { int c; int m; int y; int k; }; struct point_color square[16][16]; int i,j; ... for (i =0; i < 16; i++) for(j=0; j < 16;j++){ square[i][j].c = 0; square[i][j].m = 0; square[i][j].y = 1; square[i][j].k = 0; }
a. How cache-friendly is this code in terms of locality? b. What is the total number of writes? c. How many misses occurs in the cache while writing? d. What is the miss rate?
(in computer system language 221) pls help
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
