Question: Consider a cache memory that provides three hundred 16-byte blocks. Now consider that you are processing all the data in a two-dimensional array of, say,
Consider a cache memory that provides three hundred 16-byte blocks. Now consider that you are processing all the data in a two-dimensional array of, say, four hundred rows by four hundred columns, using a pair of nested loops. Assume that the program stores the array column by column. You can write your program to nest the loops in either direction, that is, process row by row or column by column. Explain which way you would choose to process the data. What is the advantage? Conversely, what is the disadvantage of processing the data the other way? What effect does choosing the incorrect way have on system performance?
Step by Step Solution
3.41 Rating (157 Votes )
There are 3 Steps involved in it
To see the interaction between the program and the cache memory first suppose that the program proce... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
1806_60b8c1213ddfe_721382.pdf
180 KBs PDF File
1806_60b8c1213ddfe_721382.docx
120 KBs Word File
