If P1 from the previous problem has three classes of instructions, with an instruction mix as follows
Class | CPI | Percent Used |
A | 1 | 25% |
B | 3 | 25% |
C | 4 | 50% |
Assume you are modifying the compiler and can rearrange the instruction mix by changing the instructions called by your program. Assume the number of instructions is fixed (probably unrealistic in this case).
Answer the following by showing all work:
- [1 point] Verify that the CPI for the above instruction mix is 3.0
- [2 points] By shifting instructions from class C to class A what would the new instruction mix need to be so that P1 has roughly the same performance as P2?
You should be able to do this mathematically, but you may set up a spreadsheet and guess and check if you wish. In either case, indicate how you solved the problem.
- [2 points] Why is this not likely to be possible to accomplish this task by only shifting instructions?