Question: Consider Listning 1. Assume the code is executed on a 32-bit MIPS processor that includes a data cache with the following properties: Capacity = 1024

Consider Listning 1. Assume the code is executed on a 32-bit MIPS processor that includes a data cache with the following properties: Capacity = 1024 bytes, direct mapped, block size = 16 bytes. Assume that the cache is empty (all valid bits are zero) before you call function sum. Will the data cache utilize temporal locality or spatial locality, or both? For each of the following C function calls, what is the data cache hit rate when executing the function? (a) sum(0x55aa1000,10); (b) sum(0x55aa100a,30);

Listning 1. 1 sum: 2 xor $v0,$v0,$v0 3 loop: 4 lb $t0,0($a0) 5 add $v0,$v0,$t0 6 addi $a0,$a0,1 7 addi $a1,$a1,-1 8 bne $a1,$zero,loop 9 jr $ra

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!