GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
39 views
Consider a machine with 5-stage pipeline with 1ns clock cycle. The second machine with 12-stage pipeline with a 0.6ns clock cycle. The 5-stage pipeline experiences a stall due to data hazard for every 5 instructions, whereas 12 stage pipeline experiences 3 stalls for every 8 instructions. Branch instructions constitute 20% of the total instructions , and misprediction rate for both machines is 5%.
If the branch mispredict penalty for the first machine is 2 cycles but the second machine is 5 cycles, what is the speed up of 12-stage pipeline over 5 stage pipeline--------------?
asked in CO & Architecture by (95 points)   | 39 views
Is it 1.4385???

1 Answer

0 votes

5 stage pipeline

Branch instructions = 20%

So for other 80% instructions Data Hazard may occur.

So number of stalls due to data hazard = 80% * 1/5 = 0.8*0.2 =0.16 cycles

Number of stalls due to branch instructions= 20% * Branch mis prediction ratio * branch penalty = 0.2*0.05*2 cycles= 0.02

Total stalls/instruction = 0.16+0.02=0.18 stalls.

Average Execution Time A = (1+#stalls)*cycle time = (1+0.18) * 1 ns = 1.18 ns

 

12 stage pipeline

Branch instructions = 20%

So for other 80% instructions Data Hazard may occur.

So number of stalls due to data hazard = 80% * 3/8 =0.3 cycles

Number of stalls due to branch instructions= 20% * Branch mis prediction ratio * branch penalty = 0.2*0.05*5 cycles= 0.05 cycles

Total stalls/instruction = 0.3+0.05=0.35 stalls.

Average Execution Time B = (1+#stalls)*cycle time = (1+0.35) * 0.6 ns = 0.81ns

 

SpeedUp of B(12) over A(5) = 1.18/0.81 = 1.456

answered by Junior (543 points)  

Related questions

0 votes
1 answer
1
asked ago in CO & Architecture by hem chandra joshi Active (1.1k points)   | 51 views
0 votes
1 answer
2
asked ago in CO & Architecture by Nils (307 points)   | 39 views


Top Users Aug 2017
  1. ABKUNDAN

    4670 Points

  2. Bikram

    4412 Points

  3. akash.dinkar12

    3390 Points

  4. rahul sharma 5

    3072 Points

  5. manu00x

    2682 Points

  6. makhdoom ghaya

    2430 Points

  7. just_bhavana

    2130 Points

  8. Tesla!

    1932 Points

  9. stblue

    1806 Points

  10. joshi_nitish

    1620 Points


24,935 questions
32,040 answers
74,447 comments
30,125 users