subject

You have a 1,024-byte direct-mapped data cache with 16-byte blocks. A structure is defined as: 1 struct my_struct { 2 int x; 3 int y; }; 6 struct my_struct grid[16][8]; 7 int total_x = 0, total_y = 0; 8 int i, j; Determine the cache performance for the following code: 1 for (i = 0; i < 16; i++) { 2 for (j = 0; j < 8; j++) { 3 total_x += grid[i][j].x; 4 } 5 } 7 for (i = 0; i < 16; i++) { 8 for (j = 0; j < 8; j++) { 9 total_y += grid[i][j].y; 10 } 11 } a) What is the total number of reads? b) What is the total number of reads that miss in the cache? c) What is the miss rate? d) How to modify the program to decrease the miss rate. Show the new miss rate you get. Assume: sizeof(int)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:10
Assume that to_the_power_of is a function that expects two int parameters and returns the value of the first parameter raised to the power of the second parameter. write a statement that calls to_the_power_of to compute the value of cube_side raised to the power of 3 and that associates this value with cube_volume.
Answers: 1
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
These statements describe lists in presentation programs: a. bullets can be turned off and on. b. bullets cannot be turned off. c. bullet styles, colors, and sizes can be changed. d. lists don't have to use bullets or numbers. e. numbering styles, colors, and sizes can be changed. f. numbers can be turned off and on. g. numbers cannot be turned off. select all that apply
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
File i/o activity objective: the objective of this activity is to practice working with text files in c#. for this activity, you may do all code in the main class. instructions: create an app that will read integers from an input file name numbers.txt that will consist of one integer per record. example: 4 8 25 101 determine which numbers are even and which are odd. write the even numbers to a file named even.txt and the odd numbers to a file named odd.txt.
Answers: 3
You know the right answer?
You have a 1,024-byte direct-mapped data cache with 16-byte blocks. A structure is defined as: 1 str...
Questions
Questions on the website: 13722363