Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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:

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; 

} }

What is the total number of writes? What is the total number of writes that miss in the cache? What is the miss rate?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago