1 / 4

Problem 1a (20 points, avg. 18.7)

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

platt
Download Presentation

Problem 1a (20 points, avg. 18.7)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. 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)

  3. 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

  4. 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

More Related