Computer Systems: A Programmer's Perspective (3rd Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
3rd Edition
ISBN: 9780134092669
Author: Bryant, Randal E. Bryant, David R. O'Hallaron, David R., Randal E.; O'Hallaron, Bryant/O'hallaron
Publisher: PEARSON
bartleby

Concept explainers

Question
Book Icon
Chapter 6, Problem 6.34HW
Program Plan Intro

Given Information:

The following matrix transpose routine is given:

//array declaration

typedef int array[4][4];

//function to transpose array

void transpose2(array dst, array src)

{

//variable declaration

int i,j;

//iterate through first array

for(i=0;i<4;i++)

{

//iterate through second array

for(j=0;j<4;j++)

{

//transpose matrix

dst[j][i]=src[i][j];

}

}

}

The machine that runs the code has the following properties:

  • The size of integer is “4”.
  • The “src” array starts at address “0” and “dst” array starts at address “64”.
  • There is a single L1 data cache that is direct-mapped, write-through and write allocate with a block size of 16 bytes.
  • The cache has a total size of “32” bytes and the cache is initially empty.
  • The only sources of read and write misses are accesses to the “src” and “dst” array.

Blurred answer
Students have asked these similar questions
This function will be able to determine the fields in a log entry it needs to look at in order to do its job properly. The following line of code computes the average number of cache misses for each item in the cache when 64-byte cache blocks are used without any prefetching being performed by the program.
Please do in correct way!
P2
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education