Question: The following code is written in C , where elements of an array are allocated contiguously. Arrays a has 1 0 2 4 x 1
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: and sum pts totala Which variable references exhibit temporal locality? ptsb Which variable references exhibit spatial locality? ptsc Let's focus on the data transfers for arrays ab 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
