Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

6.37 This is another problem that tests your ability to analyze the cache behavi

ID: 3862832 • Letter: 6

Question

6.37 This is another problem that tests your ability to analyze the cache behavior of C code. Assume we execute the three summation functions in Figure 6.47 under the following conditions: sizeof int) 4 The machine has a 4 KB direct-mapped cache with a 16-byte block size. the two loops, the code uses memory accesses only for the array data. The loop indices and the value sum are held in registers Array a is stored starting at memory address ox08oooooo. Fill in the table for the approximate cache miss rate for the two cases N 64 and N 60. Function N-64 N 60 sumA. sumB Sur

Explanation / Answer

private Integer tryReservation(SeatType s) { Integer reservation=null; int start=(s==SeatType.FIRSTCLASS)?firstClassStart:economyStart; int stop=start+capacity; for(int number=start;number