In: Computer Science
1.
Computer A has an overall CPI of 1.2 and can be run at a clock rate of 600MHz.
Computer B has a CPI of 2.5 and can be run at a clock rate of 750 MHz. We have a
particular program we wish to run. When compiled for computer A, this program has
exactly 100,000 instructions. How many instructions would the program need to have
when compiled for Computer B, in order for the two computers to have exactly the
same execution time for this program?
2.
For a new version of processor, suppose the capacitive load remains, how much more
energy will the processor consume if we increase voltage by 20% and increase clock rate
by 20%?
1) CPU time of A = (Number of instruction count of A) * (CPI of A) * (Clock cycle time of A)
or, CPU time of A = (100000 * 1.2) / (600 * 106)
CPU time of B = (Number of instruction count of B) * (CPI of B) * (Clock cycle time of B)
or, CPU time of B = (Instruction count of B * 2.5) / (750 * 106)
Let, number of instruction count of B = X
So, CPU time of B = (X * 2.5) / (750 * 106)
According to the condition, CPU time of A = CPU time of B
or, (100000 * 1.2) / (600 * 106) = (X * 2.5) / (750 * 106)
or, (120000) / (600 * 106) = 2.5X / (750 * 106)
or, X = 60000
So, the number of instructions = 60,000.
2) Power Consumption = CV2 / R
Where, C is capacitance, V is voltage and R is the clock rate.
In the initial, Power consumption (P1) = C1V12 / R1
After the voltage and the clock rate are increased Power consumption (P2) = C2V22 / R2
Where, C1 = C2
V2 = 1.2 * V1
R2 = 1.2 * R1
So, (P1 / P2) = (C1V12 / R1) * (R1 * 1.2 / C1 * 1.2 * 1.2 * V12)
or, (P1 / P2) = 1 / 1.2
or, P2 = 1.2 * P1
So, the energy consumption will be increased by 20%.
Hope this helps.