Question: . The following code is written in C , where elements of an array are allocated contiguously. Arrays a has 1 0 2 4 x
The following code is written in C where elements of an array are allocated contiguously. Arrays a has x elements. Arrays b and c have elements respectively. Assume each element of arrays is a byte bit integer. The data type of all variables is a byte integer also. Cache blocks are allocated on write miss, and the size of a cache line is bytes. Assume that cache size is infinite whatHint: in this code, there are variables: a b c i j and sum pts total int sum; for int i ; i ; i sum ; for int j ; j ; j sum aji bj; ci sum; a Which variable references exhibit temporal locality? ptsb Which variable references exhibit spatial locality? ptsc Lets focus on the data transfers for arrays a b and c How many lw and sw instructions are issued while executing this code? pts Array a: Array b: Array c:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
