I don\'t understand any thing from this slide please explain it + provide calcul
ID: 3644173 • Letter: I
Question
I don't understand any thing from this slide
please explain it + provide calculation example .
Average Cycles per Instruction (CPI) Average CPI = total number of clock cycles/ # of instructions executed Execution time [sec]= Clock cycle time Ii =number of times instruction i is executed in a program CPIi= Average number of clocks to complete per instruction i Instruction Relative Frequency (Fi) Average CPI = where Fi =Ii/instruction count Fi = relative frequency of appearance of instruction i in a program Invest Resources where time is Spent! Caution: in pipelined machines, CPI = mean time between instruction completions! Unambiguous alternative: IPCExplanation / Answer
first try to understand what the clock cycle time is ? it is the time in seconds for one complete cycle of processor clock.Now there are different type of instruction in each processor and each is taking different time than other,the time taken by these instruction is calculated in number of clock cycles.
So to calculate the performance of a processor we must't ask one what is the time taken by add instruction or multiply/sub or div instructions,so we calculate the average of clock cycles taken by each instruction.
clock cycles per instruction (CPI) = time taken by instruction / clock cycle time
average clock cycle per instruction ( average CPI ) = total time taken by all instructions / ( number of intruction * clock cycle time )
i.e. avg.CPI = total number of clock cycle /number of instructions.
since each instruction type has different CPI ,so multiplying number of instructions of particular type with there corresponding CPI gives the number of clock cycles spent on a particular trace of intructions.
total number of clck cycles = sum of ( CPI of particular instruction * number of that instrcution )
total time = clock cycle time * total number of clck cycles
instruction relative frequency refers to ratio of number of times a particular instruction is executed to the that particular instruction count in that program ( keep in mind that due to principle of locality some instruction in program may never execute ).
So,
F = ( Number of times a instruction is executed in a program Ii ) / (number of times that instruction appears in that program)
So,
average CPI = sum of ( CPIi * Fi ).
Higher the F of a particular type of instruction ,higher the CPI ,Higher the Throughput,
So,slide says invest resources for higher F.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.