• sizeof (int) = 4. Consider the following matrix transpose routine: The src array starts at address 0 and the dst array starts at address 64 (decimal). • There is a single L1 data cache that is direct-mapped, write- through, write-allocate, with a block size of 16 bytes. 1 typedef int array[4] [4]; • The cache has a total size of 32 data bytes, and the cache is 2 initially empty. 3 void transpose2 (array dst, array src) • Accesses to the src and dst arrays are the only sources of read 4 { and write misses, respectively. 5 int i, j: A. For each row and col, indicate whether the access to src[row][col] and dst [row][col] is a hit (h) or a miss (m). For example, reading src[0] [0] is a miss and writing dst[0] [0] is also a miss. 7 for (i = 0; i < 4; i++) { 8. for (j = 0; j < 4; j++) { dst [j] [i] = src[i][j]; 9 10 dst array sre array 11 Col. 0 Col. 1 Col. 2 Col. 3 Col. 0 Col. 1 Col. 2 Col. 3 12 Row m Row Row Row Assume this code runs on a machine with the following properties: 1 1 Row Row 2 Row Row 3 3
• sizeof (int) = 4. Consider the following matrix transpose routine: The src array starts at address 0 and the dst array starts at address 64 (decimal). • There is a single L1 data cache that is direct-mapped, write- through, write-allocate, with a block size of 16 bytes. 1 typedef int array[4] [4]; • The cache has a total size of 32 data bytes, and the cache is 2 initially empty. 3 void transpose2 (array dst, array src) • Accesses to the src and dst arrays are the only sources of read 4 { and write misses, respectively. 5 int i, j: A. For each row and col, indicate whether the access to src[row][col] and dst [row][col] is a hit (h) or a miss (m). For example, reading src[0] [0] is a miss and writing dst[0] [0] is also a miss. 7 for (i = 0; i < 4; i++) { 8. for (j = 0; j < 4; j++) { dst [j] [i] = src[i][j]; 9 10 dst array sre array 11 Col. 0 Col. 1 Col. 2 Col. 3 Col. 0 Col. 1 Col. 2 Col. 3 12 Row m Row Row Row Assume this code runs on a machine with the following properties: 1 1 Row Row 2 Row Row 3 3
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Consider the following matrix transpose routine:
1 typedef int array[4][4];
2
3 void transpose2(array dst, array src)
4 {
5 int i, j;
6
7 for (i = 0; i < 4; i++) {
8 for (j = 0; j < 4; j++) {
9 dst[j][i] = src[i][j];
10 }
11 }
12 }
Assume this code runs on a machine with the following properties:
![• sizeof (int) = 4.
Consider the following matrix transpose routine:
The src array starts at address 0 and the dst array starts at
address 64 (decimal).
• There is a single L1 data cache that is direct-mapped, write-
through, write-allocate, with a block size of 16 bytes.
1
typedef int array[4] [4];
• The cache has a total size of 32 data bytes, and the cache is
2
initially empty.
3
void transpose2 (array dst, array src)
• Accesses to the src and dst arrays are the only sources of read
4
{
and write misses, respectively.
5
int i, j:
A. For each row and col, indicate whether the access to
src[row][col] and dst [row][col] is a hit (h) or a miss (m).
For example, reading src[0] [0] is a miss and writing dst[0]
[0] is also a miss.
7
for (i = 0; i < 4; i++) {
8.
for (j = 0; j < 4; j++) {
dst [j] [i] = src[i][j];
9
10
dst array
sre array
11
Col. 0
Col. 1
Col. 2
Col. 3
Col. 0
Col. 1
Col. 2
Col. 3
12
Row
m
Row
Row
Row
Assume this code runs on a machine with the following properties:
1
1
Row
Row
2
Row
Row
3
3](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa3bce4df-4e16-468b-8df3-9b01ee0fdcd8%2F97a82bde-7e61-4057-ab88-ddd170952919%2Fabz8hmu_processed.png&w=3840&q=75)
Transcribed Image Text:• sizeof (int) = 4.
Consider the following matrix transpose routine:
The src array starts at address 0 and the dst array starts at
address 64 (decimal).
• There is a single L1 data cache that is direct-mapped, write-
through, write-allocate, with a block size of 16 bytes.
1
typedef int array[4] [4];
• The cache has a total size of 32 data bytes, and the cache is
2
initially empty.
3
void transpose2 (array dst, array src)
• Accesses to the src and dst arrays are the only sources of read
4
{
and write misses, respectively.
5
int i, j:
A. For each row and col, indicate whether the access to
src[row][col] and dst [row][col] is a hit (h) or a miss (m).
For example, reading src[0] [0] is a miss and writing dst[0]
[0] is also a miss.
7
for (i = 0; i < 4; i++) {
8.
for (j = 0; j < 4; j++) {
dst [j] [i] = src[i][j];
9
10
dst array
sre array
11
Col. 0
Col. 1
Col. 2
Col. 3
Col. 0
Col. 1
Col. 2
Col. 3
12
Row
m
Row
Row
Row
Assume this code runs on a machine with the following properties:
1
1
Row
Row
2
Row
Row
3
3
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY