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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started