Two processors P1 and P2execute the same instruction set. Assume four classes of
ID: 3611826 • Letter: T
Question
Two processors P1 and P2execute the same instruction set. Assume four classes ofinstruction (A, B, C, and D). Following table has the clockrate and CPI for each processor. Processor Clock rate CPI Class A CPI Class B CPI Class C CPI Class D P1 1.5 GHz 1 2 3 4 P2 2 GHz 2 2 2 2- suppose there is aprogram with 10^6 instructions divided into 10% class A, 20% B, 50%C and 20% D, which processor has higher performance?
- What is the global CPIfor each processor?
- How many total clockcycles will each processor spend on running theprogram?
Explanation / Answer
CPUTime = (IC * CPI) / clock rate
Processor P1
CPUtime for A = (100000 * 1) / (1.5*10^9) = 6.67 *10^-5
CPUtime for B = (200000 * 2) / (1.5*10^9) = 1.33 *10^-4
CPUtime for C = (500000 * 3) / (1.5*10^9) = 0.001
CPUtime for D = (200000 * 4) / (1.5*10^9) = 5.33 *10^-4
Processor P2
CPUtime for A = (100000 * 2) / (2*10^9) = 1*10^-4
CPU time for B = (200000 * 2) / (2*10^9) = 2*10^-4
CPU time for C = (500000 * 2) / (2*10^9) = 5*10^-4
CPU time for D = (200000 * 2) / (2*10^9) = 2*10^-4
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.