229k views
2 votes
For some program, compiler A produces a program with a dynamic instruction count of 109 instructions and execution time of 1.1 seconds, while compiler B produces a program with a dynamic instruction count 1.2*109 and execution time of 1.5 seconds. Find an average CPI for each program given that the processor has a clock cycle time of 10-9 seconds. You must show the computations that lead to the answer.

1 Answer

4 votes

Answer:


CPI_(A) = 1.1


CPI_(B) = 1.25

Step-by-step explanation:

How to calculate the CPI generated by each compiler

we need to use the following formula

CPI=(CPU Clock cycle/Instruction count)


CPI_(A)

=(1.1s/(1 x 10s-9)) (1/(1 x 109)

=1.1


CPI_(B)

=(1.5s/(1 x 10s-9)) (1/(1.2 x 109))

=1.25

User Bparker
by
7.9k points