2) A program, being executed on a processor, has the following instructions mix: Operation ALU Load Store Branches Frequency 40% 20% 15% 25% Clock cycles per instruction 2 10 4. 3 a) Compute the average clock cycles per instruction b) Compute the percent of execution time spent by each class of instructions c) A designer wants to improve the performance. He designs a new execution unit that makes 80% of ALU operations take only 1 cycle to execute. The other 20% of ALU operations will still take 2 cycles to execute. The designer also wants to improve the execution of the memory access instructions. He does it in a way that 95% of the load instructions take only 2 cycles to execute, while the remaining 5% of the load instructions take 10 cycles to execute per load. He also improves the store instructions in such a way that each store instruction takes 2 cycles to execute. Compute the new average CPI d) What is the speedup factor by which the performance has improved in part c?

Get full solution in 10 Seconds

EXPERT ANSWER

Answer. Let Us First Discuss About Some Theory for this Question.

We Know that Performance Equation is given as :

CPU Time = Cycle Time * Instruction Count * Average CPI

Assuming n different type of Instructions each with count IC and requiring CPI cycles Then,

a) Average CPI= sum of (CPI * Frequency) of all the instructions.

b) Percentage execution Time spent by each class of Instructions is given by Frequency/Average CPI.

Here is the Image of Answers for both a) and b) Questions.

c) Enhanced Average CPI is calculated as follows:

d) Speed Up Factor is calculated as Average CPI(old)/Average CPI(Enhanced) i.e 4.15/4.65 = 0.89.