Question: 1 . ( 5 points ) Consider the code below and answer the following questions. a . What is the total number of writes? b
points Consider the code below and answer the following questions.
a What is the total number of writes?
b What is the total number of writes that miss in the cache?
c What is the miss rate?
struct pointcolor
int c;
int m;
int y;
int k;
struct pointcolor square;
int i j;
for i ; i ; i
for j ; j ; j
squareijy ;
for i ; i ; i
for j ; j ; j
squareijc ;
squareijm ;
squareijk ;
Assume the following:
The system has a byte directmapped data cache with byte blocks
sizeofint
square begins at memory address
The cache is initially empty
The only memory accesses are to the entries of the array square
Variables i and j are stored in registers
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
