retagged by
3,658 views
7 votes
7 votes
Consider a pipeline ‘x’ consist of 5 stages named as IF, ID, OF, EX and WB with the respective stage delays of 2 ns, 5 ns, 6 ns, 8 ns and 1 ns. The alternative pipeline ‘y’ contain the same number of stages but EX stage is divided into 4 sub stages, (EX1, EX2, EX3 and EX4) with equal delay i.e. (8 ns/4) and ID stage is divided into 2 sub stages (ID1 and ID2) with equal delays of (5 ns/2). In the pipeline x and y memory reference instructions are not overlapped so the penalty of memory reference instructions in the pipeline ‘x’ is 4 cycles and in the pipeline ‘y’ is 8 cycles. If the program contains 30% of the instructions which are memory based instructions, the ratio of the speedup ratio of x to the speedup ratio of y is ___________.
retagged by

4 Answers

Best answer
8 votes
8 votes

SpeedUp of pipeline processor over non-pipeline is $S = \frac{t_{n}}{t_{p}* \ ( avg. \ cpi )}$ for large value of n = no of instructions.

if average cpi is = 1 then speedup is simply = $S = \frac{t_{n}}{t_{p}}$

Where $t_{n} =$ time to complete one instruction in non-pipeline processor

$t_{p} =$ pipeline clock cycle

For X :
pipeline clock = 8 ns
average cpi = $0.3*5 \ + 0.7*1 = 2.2$

$S_{x} = \frac{22}{2.2*8} = 1.25$

For Y:
pipeline clock = 6 ns
average cpi = $0.3*9 + 0.7*1 = 3.4$

$S_{y} = \frac{22}{3.4*6} = 1.0784$

So, $\frac{S_{x}}{S_{y}} = 1.15909 = 1.16$

selected by
4 votes
4 votes
non pipeline=>

time for 1 instruction= (2+5+6+8+1)ns=22ns

 

pipeline x=>

1 stage delay=max(2,5,6,8,1) ns=8ns

for 30% mem instructions penalty is 4 cycles

time for 1 instruction=(1+0.3*4)*8 ns=17.6 ns

 

pipeline y=>

1 stage delay=max(2,2.5,2.5,6,4,4,1)ns=6ns

for 30% mem instructions penalty is 4 cycles

time for 1 instruction=(1+0.3*8)*6 ns=20.4 ns

 

now as both pipeline x and y were a upgrade from original non pipeline model

speed up x / speed up y

=(22/17.6)/(22/20.4)

=20.4/17.6

=1.15909..(ans)
2 votes
2 votes
Since we know that speed up is given by  

S= pipeline depth/1+(number of stalls per instruction)

and. no. of stalls per instruction = frequency* branch penality

so for pipeline(x) speed up = 5/1+(0.3*4)

                                       => 2.27

pipeline(y) speed up= 9/1+(0.3*8)

                            =>  2.64

ratio of speedup Sx/Sy=  2.27/2.64 => 0.859
0 votes
0 votes

X = [IF] [ID] [OF] [EX] [WB]; Clock = 8ns

Y = [IF] [ID1] [ID2] [OF] [EX1] [EX2] [EX3] [EX4] [WB]; Clock = 8ns

For X:

Let number of instructions be 100.

70 inst. of CPI = 1, 30 inst. of CPI = 5

Thus Total Execution time = 70 x 1 x 8 + 30 x 5 x 8 = 1760 ns

Total Execution Time without pipeline = 100 x 22ns = 2200 ns

Thus Speedup(x) = 2200/1760 = 1.25

For Y:

Let number of instructions be 100.

70 inst. of CPI = 1, 30 inst. of CPI = 9

Thus Total Execution time = 70 x 1 x 8 + 30 x 9 x 8 = 2720 ns

Total Execution Time without pipeline = 100 x 51ns = 5100 ns

Thus Speedup(y) = 5100/2720 = 1.875

Therefore, Speedup(x)/Speedup(y) = 0.666 or 66.66%

Related questions

0 votes
0 votes
1 answer
1
shima abdullah asked Jun 27, 2022
817 views
if an unpipelined processor with a cycle time of 25 ns is evenly divided into 5 pipeline stages using pipeline latches with 1-ns latency,what is the total latency of the ...
2 votes
2 votes
2 answers
2
Nihal Singh asked Oct 26, 2021
1,441 views
Hi, I have a question like how Load/Store operation behave in pipelining, with or without operand forwarding ?
1 votes
1 votes
1 answer
3
s_dr_13 asked Mar 8, 2019
652 views
Please cite some useful resources where lots of problems are based on pipeline,illustrating every kind of problems can be asked in GATE