Exercise 3 & 12
Exercise 3 & 12
12
Phạm Nhật Minh –
23BI14298
A6 – Group 5
Given data:
-3 different CPI measurements for a machine for 3 different
class:
+ For A, it’s 2 CPI
+ For B, it’s 5 CPI
+ For C, it’s 7 CPI
- For code sequence 1, there are 15 millions, 5 millions and 3
millions instruction counts in class A, B and C, respectively.
- For code sequence 2, there are 25 millions, 2 millions and 2
millions instruction counts in class A, B and C, respectively.
- The machine’s clock rate is 500 Mhz.
Part a) requires us to calculate the MIPS (million
instructions per second) and use it to determine whether
code sequence 1 or code sequence 2 will execute faster.
a) Which code MIPS is calculated by a formula:
sequence will
execute faster
according to
MIPS? We need to separately calculate the MIPS of both code
sequence, then make a comparison. The higher the MIPS
rating, the faster the sequence will execute.
= = 3.304
= = 2.552
===
===
Conclusion: Since > , the code sequence 2 will execute faster.
match the • Setting the value of the CPI of load/store instructions as x, we need to find
x so that the total execution time will reduce from 9.6 to 3.84.
performance of
four processors
using the original
CPI values?
Calculate the new CPIs for load/store instructions
Conclusion