• retagged by
957 views

1 Answer

Best answer
7 7 votes

Basically the question is asking about x i.e. branching probability..

Assuming uniform pipeline , i.e. cycle times of all stages are same,,then

Speedup  =  Execution time in non pipelined system / In pipelined system

               =  CPInon pipelined * Clock cycle timenon pipelined /  CPIpipelined * Clock cycle timepipelined

               =   No of stages / CPIpipelined

               =   No of stages / (1 + No of stall cycles per instruction) [As CPI of ideal pipeline  =  1]

Now stall will happen here due to branch instruction only since only this factor is mentioned(other factors include cache miss , data dependency etc) ..Now we know ,

No of stalls / instruction (Branch penalty)  = Stage at which target address is computed - 1

So ,

 No of stalls / instruction for a branch instruction(Branch penalty)   =  4 - 1   =  3

Given probability of non branch instruction  = x

So probability of branch instruction             = 1 - x

So stalls / instruction effectively                =  3(1-x)

Hence for speedup to be at least 5 , we have :

          6 / (1 + 3(1-x))  >= 5

==>    6 / (4 - 3x)        >= 5

==>    6      >= 20 - 15x

==>    x      >=  14 / 15

==>    xmin    =   0.9333

So max of  6.67 % instructions approximately is allowed to be branch instructions to attain minimum speedup of 5..

• selected by
Position:
Show:

Related questions

0 0 votes
1 1 answer
1.1k
1.1k views
Raj Singh 1 asked Jan 9, 2019
1,139 views
The title says it all: How many stall cycles are caused due to each incorrect branch prediction?Additional details you might need:Branch is executed in execution stage of...
79 79 votes
11 answers 11 answers
34.0k
34.0k views
go_editor asked Sep 28, 2014
33,955 views
Consider a $6$-stage instruction pipeline, where all stages are perfectly balanced. Assume that there is no cycle-time overhead of pipelining. When an application is exec...
199 199 votes
9 answers 9 answers
78.9k
78.9k views
Kathleen asked Sep 22, 2014
78,912 views
A $5$ stage pipelined CPU has the following sequence of stages:IF – instruction fetch from instruction memoryRD – Instruction decode and register readEX – Execute: ALU op...
74 74 votes
4 answers 4 answers
35.9k
35.9k views
Kathleen asked Sep 12, 2014
35,927 views
Which of the following are NOT true in a pipelined processor?Bypassing can handle all RAW hazardsRegister renaming can eliminate all register carried WAR hazardsControl h...