How long does a program take to run on a processor with a 2G

How long does a program take to run on a processor with a 2GHz clock if it has 10^10 instructions and a CPI of 2?

Solution

CPI means Cycles per Instruction.

Here CPI=2 means ------- 2 cycles are required per instruction

That would mean---------- 2*(10^10) cycles required for (10^10) instructions.

Now, 1 cycle/sec = 1 Hz, that means this processor runs at 2giga cycles/sec= 2*(10^9) cycles/sec

We need to find the time taken for 10^10 instructions. So, we can inturn calculate the time taken for 2*(10^10) cycles (as CPI=2) when the speed is 2*(10^9) cycles/sec. That would then be {2*(10^10)}/{2*(10^9)} = 10seconds

So time taken for 10^10 instructions on a processor of 2GHz with a CPI of 2 is 10 seconds.

How long does a program take to run on a processor with a 2GHz clock if it has 10^10 instructions and a CPI of 2?SolutionCPI means Cycles per Instruction. Here

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site