Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Compilers can have a profound impact on the performance of an application. Assum

ID: 3562735 • Letter: C

Question

Compilers can have a profound impact on the performance

of an application. Assume that for a program, compiler A results in a dynamic

instruction count of 1.0E9 and has an execution time of 1.1 s, while compiler B

results in a dynamic instruction count of 1.2E9 and an execution time of 1.5 s.

a. Find the average CPI for each program given that the processor has a clock cycle

    time of 1 ns.

b. Assume the compiled programs run on two different processors. If the execution

    times on the two processors are the same, how much faster is the clock of the

    processor running compiler A

Explanation / Answer

[1]

1.6.1 <1.4> For the same program, two different compilers are used. The table above shows the execution time of the two different compiled programs. Find the average CPI for each program given that the processor has a clock cycle time of 1 ns.

1ns = 1 GHz

ExeTime = (Inst * CPI) / Clock

ExeTime * Clock = Inst * CPI

(ExeTime * Clock) / Inst = CPI

aa)(1.8 * (1*10^9)) / (1*10^9) = 1.8

ab)(1.8 * (1*10^9)) / (1.2*10^9) = 1.5

ba)(1.1 * (1*10^9)) / (1*10^9) = 1.1

bb)(1.5 * (1*10^9)) / (1.2*10^9) = 1.25

1.6.2 <1.4> Assume the average CPIs found in 1.6.1, but that the compiled programs run on two different processors. If the execution times on the two processors are the same, how much faster is the clock of the processor running compiler A

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote