B 4 Computer A has an overall CPI of 13 and can be run at a
B. [4] Computer A has an overall CPI of 1.3 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?
Solution
We know, Execution time = (CPI * no. of Instructions)/clock rate
So, execution time for Computer A is (1.3 * 100,000)/600 = 216.67 micro-sec
It is given that execution time for B is same that of A. i.e.,
216.67 * 10-6 = (2.5 * I)/(750 * 106) which gives I = (216.67 * 750)/2.5 = 65,000
So, program will need 65,000 instructions when compiled for Computer B, in order for the two computers to have exactly the same execution time for this program.
![B. [4] Computer A has an overall CPI of 1.3 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 B. [4] Computer A has an overall CPI of 1.3 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](/WebImages/41/b-4-computer-a-has-an-overall-cpi-of-13-and-can-be-run-at-a-1125559-1761600082-0.webp)