40 likes | 186 Views
Problem 1a (20 points, avg. 18.7). Grow stack : 2 points Save $ra : 2 points Save $a0 : 2 points Restore $a0 between jals: 2 points Restore $ra after last jal: 2 points Shrink stack : 2 points Two jals : 2 x 1 point jr and function label : 1 point add(i) correct : 2 points
E N D
Problem 1a (20 points, avg. 18.7) • Grow stack : 2 points • Save $ra : 2 points • Save $a0 : 2 points • Restore $a0 between jals: 2 points • Restore $ra after last jal: 2 points • Shrink stack : 2 points • Two jals : 2 x 1 point • jr and function label : 1 point • add(i) correct : 2 points • Overall order : 3 points
Problem 1b (20 points, avg. 15.5) • Grow stack correctly : 2 points • Save $ra (or $s0) : 4 points • Restore $ra (or $s0) : 4 points • Shrink stack : 2 points (0 if didn’t shrink in base case) • Flagging $s0 error : 4 points • No further errors : 4 points (-1 per additional error flagged)
Problem 2 (40 points, avg. 34.2) • Correct #cycles, CPI or #seconds for old processor : 10 points • Correct #cycles for new processor : 20 points OR correct CPI of new processor : 10 points correct #instructions for new processor : 10 points • Correct factoring of 10% slower clock speed : 5 points • Correct calculations for new processor : 5 points
Problem 3 (20 points, avg. 11.6) • New floating-point: 0.2T / 1.25 : 1 point 0.8T : 1 point New memory system: 0.35T / 2.5 : 1 point 1.2 applied correctly : 1 point 0.65T : 1 point (b) Agree. Useful because context switching overhead saved : 3 points Not essential since CPU interrupted as soon as it returns : 2 points (c) Proper justification : 5 points Partial justification : 3 points (d) Disagree. Full justification : 5 points Trial and error/partial argument : 3 points