GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
46 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 (101 points) 2 | 46 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 (627 points) 1 7


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23324 Points

  2. Bikram

    17048 Points

  3. Habibkhan

    7808 Points

  4. srestha

    6222 Points

  5. Debashish Deka

    5430 Points

  6. jothee

    4958 Points

  7. Sachin Mittal 1

    4772 Points

  8. joshi_nitish

    4286 Points

  9. sushmita

    3964 Points

  10. Rishi yadav

    3794 Points


Recent Badges

Nice Comment junaid ahmad
Popular Question iarnav
Notable Question makhdoom ghaya
Popular Question LavTheRawkstar
Avid Voter atul_21
Popular Question hem chandra joshi
100 Club nikhil_cs
Notable Question Sukannya
Notable Question Sourabh Kumar
Notable Question shikharV
27,287 questions
35,134 answers
83,911 comments
33,223 users