Consider a pipelining with m stage and n instr...

Consider a pipelining with m stage and n instructions. The probabilities that a instruction will be conditional is 'p' and it will evaluates to be true is 'q'. What can be effective CPI ?

(A) 1+pq(n-1)

(B) 1+pq(m-1)

(C) 1+mpq(n-1)

(D) 1+npq(n-1)

1Comment
Sumit Verma @sumitverma 1 Dec 2016 04:39 pm

Total number of conditional branch instructions= np
Total number of instructions which actually branch = npq
Total number of instruction which will not branch = n-npq = n(1-pq)
Effective CPI = (m*npq+n(1-pq))/n
=mpq+(1-pq)
=1+pq(m-1)