COA Numerical:: Performance: Q1
COA Numerical:: Performance: Q1
Performance:
Q1.
1. A program consist of 5,000 floating point instructions and 25,000 integer
instructions. Processor A has a clock rate of 2.0 GHz. Floating point
instruction take 7 cycles and integer instruction take 1 cycle. How long does
it take for this processor to run a program?
Ans: Cyclefp = 7(5000) = 35,000
Cycleint = 1(25,000)= 25,000
Total Cycles = 35000+25000 = 60,000 cycles
Cycle time = 1/ f = 1/ 2*109Hz = 500 ps
Time = 60000* 500 = 30 microseconds.
2. What is average CPI for this processor for the given program?
Ans: 60000 cycles/30000 inst. = 2 cycle/inst.
4. Processor B has an average CPI for program 2 of 3.5 . Its clock rate is 1.8
GHz. How much time does it take to execute the program?
Ans: = Inst.* CPI * Cycle time
= 150000*3.5* 1/1.8 *109
= 292 microseconds
Ans: Given,
Ic = 200000 , f= 40 MHz = 40* 106 Hz
Number of cycles needed to executed arithmetic and logic instruction
= 1*60/100 *(200000) = 1,20000
No. of cycles needed to execute load/store = 2*18/100 *(200000)
= 72000
No. of branch inst.---
= 4* 12/100 *(200000) = 96000
No. of cycles. -----
= 8* 10/100 *(200000) = 160000