retagged by
577 views
0 votes
0 votes

retagged by

1 Answer

Best answer
0 votes
0 votes

Let the number of instructions be 'n'.

Speedup = $\frac{Time_{non-pipeline}}{Time_{pipeline}}$

Timenon-pipeline = 5 * n * Tclk

Now, let 'x' instructions incur 0 stall cycles, so CPI of these 'x' instrutions =1

Then, 'n-x' instructions incur 3 stall cycles, so CPI of these 'n-x' instructions = 4

Timepipeline = [(x * 1) + [(n-x) * 4]] * Tclk = (4n - 3x) * Tclk

Speedup = $\frac{5n *T_{clk}}{(4n - 3x) * T_{clk}}$ = 3.

$\therefore$ x = $\frac{7n}{9}$

So, number of instructions which incurred 3 stall cycles = n - $\frac{7n}{9}$ = $\frac{2n}{9}$

Percentage = $\frac{\frac{2n}{9}}{n}$ * 100 = 22.2%

selected by

Related questions

0 votes
0 votes
1 answer
4
kathan Mistry asked Aug 9, 2022
631 views
In a pipelined architecture Static branch prediction is used with branch taken assumption. Assume that 30% of the instructions executed for a program are branch instructi...