If two processors given below run exactly the same program i
If two processors given below run exactly the same program in a perfect scenario, which processor runs faster and how many times faster?
Assume that the number of instructions being execute is very large, e.g. millions of instructions. Also, assume the pipeline execution of processor B is perfect, i.e. no branch mis-prediction penalty and no cache miss penalty (the two processors do not use cache).
Processor
Clock Frequency
Non-pipeline Processor A
10MHz
Three-stage Pipeline Processor B
28MHz
| Processor | Clock Frequency |
| Non-pipeline Processor A | 10MHz |
| Three-stage Pipeline Processor B | 28MHz |
Solution
Time taken by processor A to execute 1 instruction = (1/10)*10-6 = 0.1*10-6 sec
Let stage delay in processor B for each stage is 1*10-9 sec.
Now, time taken by processor B to execute 1 instruction = (1/28)*10-6 + 2*10-9
= 0.03571*10-6 + 2*10-9 = 0.03571*10-6 + 0.002*10-6 = 0.03771*10-6 sec
As, we can see processor B takes less time to execute 1 instruction. Therefore, processor B runs faster than A.
b.) Now, processor B will be (0.1*10-6)/(0.03771*10-6) = 2.65 times
Hope it helps.
