retagged by
1,573 views
3 votes
3 votes
A pipelined processor has two branch delay slots. An optimizing compiler can fill one of these slots $85$ % of the time, and can fill the second slot only $20$ % of the time.

If we assume that $20$ % of the instructions executed are branch instructions, then the percentage improvement in performance achieved by this optimization is ________%.
retagged by

1 Answer

Best answer
2 votes
2 votes

Number of cycles needed to execute 100 instructions:

  1. For 100 instructions 20 instructions creates 2 stall cycle ( because they mention a pipeline processor has two branch delay slots.)  because of branch instruction.   

So total no of stall cycle/instruction = 0.80*0 + 0.20*2 = 0.40 Stall/instruction  

 Total time = 1 + 0.40 = 1.40 cycle/instruction .

now for 100 instructions total time takes 1.40 * 100 = 140 ( this is without optimization) 

so 140 is without optimization value, 

        2.  With optimization ( 140 - 20 * 0.85- 20 * 0.2 ) = 119

In question it is given "we assume that 20 percent of the instructions executed are branch instructions " 

here 20 is number of instructions out of 100 instructions

so 20* 0.85 as (optimizing compiler can fill one of these slots 85 percent of the time - is given in question)  and 20 * 0.2 ( as given - can fill the second slot only 20 percent of the time. )  and subtract that from 140, so it gives 119

see here

{140 -( 20 * 0.85) - (20* 0.2) } = 119

now to calculate  percentage improvement in performance achieved by this optimization they use the formula :

(without optimization time / with optimization time ) * 100 

that means {(140 / 119 ) - 1 * 100} = 17.64 % 

Earlier performance was 1 and now it is  1.1764 ( 140/119 = 1.1764)   so performance improvement by the optimization is 17.64%

edited by
Answer:

Related questions

319
views
1 answers
1 votes
Bikram asked Nov 25, 2016
319 views
Consider two pipelines A and B. Pipeline A has $8$ stages with uniform stage delay of $2$ns. Pipeline B has $5$ stages with uniform stage delays of $3$ ... in ns) by pipeline A compared to pipeline B to execute $100$ instructions is _____.
380
views
2 answers
0 votes
Bikram asked Nov 25, 2016
380 views
A non-pipeline system takes $25$ ns to process a task. The same task can be processed in a six-segment pipeline in a clock cycle of $10$ ns.The speed-up rotation of the pipeline for $10$ tasks will be _______.
413
views
1 answers
1 votes
Bikram asked Nov 25, 2016
413 views
We have two implementations of the same Instruction Set Architecture (ISA). Machine $A$ has a clock cycle time of $50$ ns and a CPI of $4.0$ for a program, ... than B.Machine B is faster than A.Both have the same speed.None of the above
439
views
1 answers
1 votes
Bikram asked Nov 25, 2016
439 views
In a seven-segment pipeline, each segment takes $1$ cycle. Assuming there are no stalls, the number of clock cycles required to process $180$ tasks in a seven – segment pipeline is _______ cycles.