Two computers have 12-stage fetch-execute cycles where branches are determined i
ID: 3804820 • Letter: T
Question
Two computers have 12-stage fetch-execute cycles where branches are determined in stage 5. One computer is pipelined with a pipeline latency of t_ p = 1 and the other is not pipelined. We are running a program of 5, 000 instructions which contain 250 branches, each of which skips over 8 instructions. Answer the following. a. How much faster is the pipelined machine over the non-pipelined machine assuming no branches are taken? b. How much faster is the pipelined machine over the non-pipelined machine assuming all branches are taken? c. Bonus question: Rather than 250 branches, assume there are b branches. How large would b have to be such that if all branches are taken, the pipelined machine and the non-pipelined machine have the same performance?Explanation / Answer
a.
For Pipeline machine without branching :
number of instructions + (no. of stages-1) = 5011
For Non-Pipeline machine without branching :
No. of Instruction * no. of stages = 5000 * 12 = 60000
there fore pipelined machine is about 11.97 ~ 12 times faster.
b.
All branches taken,
Non pipelined : 5000*12 - 250*8*12 = 60000 - 24000 = 36000
Pipelined : 5011 - 250*8 = 5011-2000 = 3011
Pipelined will be about 11.95 ~ 12 times faster than non pipelined version
c.
no. of branches = b
speed of pipelined = speed of non pipelined
5011-b*8 = 60000 - b*8*12
11*b = 54989
b = 4999
there should be 4999 branches.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.