Question: HW 5 - 1 ( 1 2 points ) Given the following C code definitions: struct point _ color { int c; int m; int
HW points
Given the following C code definitions:
struct pointcolor
int c;
int m;
int y;
int k;
;
struct pointcolor square;
int i j;
and the following assumptions:
Handout
sizeofint
square begins at mem addr
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 byte direct mapped cache with byte blocks:
for i; i; i
for j; j; j
squareijc ;
squareijm ;
squareijy ;
squareijk ;
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
