Question: HW 5 - 1 ( 1 2 points ) Given the following C code definitions: struct point _ color { int c; int m; int

HW5-1(12 points)
Given the following C code definitions:
struct point_color {
int c;
int m;
int y;
int k;
};
struct point_color square[16][16];
int i, j;
and the following assumptions:
Handout 11
sizeof(int)==4
square begins at mem addr 0
cache initially empty
only mem accesses are to entries of array square; i and j are stored in registers.
determine the cache performance of the following code when the cache is a 2048-byte direct- mapped cache with 32-byte blocks:
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 =0;
square[i][j].k =0;
}}
(a) What is the total number of writes?
(b) What is the total number of writes that miss in the cache? (b) What is the miss rate?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!