This question if for a Homework problem in my Computer ArchitectureClass. Refer
ID: 3864182 • Letter: T
Question
This question if for a Homework problem in my Computer ArchitectureClass.
Refer to the following table for the data required:
a.) Calculate execution time of a program on a 2 Ghz prcessor.
b.) Find global CPI of the program.
c.) If number of load instructions can be reduced by one-half, what is the speed up and CPI?
d.) If number of store and arithmetic instructions can be reduced by one-half, what is the speed up and CPI?
Arith Store Load Branch Instruction for Program 500 150 100 100 CPI 1 5 5 2Explanation / Answer
a.) Total number of cycles = Number of instructions * Cycles per instruction(CPI)
= (500 * 1) + (150 * 5) + (100 * 5) + (100 * 2)
= 500 + 750 + 500 + 200
= 1950 cycles
Execution time1 = Number of cycles/ Clock rate
= 1950/ (2 * 109)
= 975 * 10-9 seconds = 975 nanoseconds
b.) Global CPI = Total number of cycles/ Total number of instructions
= 1950/ 850
= 2.29 cycles per instruction
c.) Number of load instructions = 50.
Execution time2 = (500 * 1) + (150 * 5) + (50 * 5) + (100 * 2) / Clock rate
= 500 + 750 + 250 + 200 / 2 * 109
= 1700/ 2 * 109
= 850 nanoseconds
Speed up = Execution time1 / Execution time2
= 975 / 850 = 1.147
CPI = 1700/ 800 = 2.125 cycles per instruction
d.) Number of arithmetic instructions = 250
Number of store instructions = 75
Execution time3= (250 * 1) + (75 * 5) + (100 * 5) + (100 * 2) / Clock rate
= 250 + 375 + 500 + 200 / 2 * 109
= 1325 / 2 * 109
= 662.5 nanoseconds
Speed up = Execution time1 / Execution time3
= 975 / 662.5 = 1.47
CPI = 1325/ 525 = 2.52 cycles per instruction
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.