edited by
20,526 views
48 48 votes

Consider a pipeline processor with $4$ stages $S1$ to $S4$. We want to execute the following loop:

for (i = 1; i < = 1000; i++) 
    {I1, I2, I3, I4} 

where the time taken (in ns) by instructions $I1$ to $I4$ for stages $S1$ to $S4$ are given below:

$$\begin{array}{|c|c|c|c|c|} \hline  & \textbf {$S _1$} &\textbf {$S _2$} & \textbf {$S _3$} &  \textbf{$S _4$ } \\\hline \textbf{I1}& \text{$1$} & \text{$2$}  & \text{$1$} & \text{$2$} \\\hline \textbf{I2} & \text{$2$} & \text{$1$} & \text{$2$}  & \text{$1$}\\\hline  \textbf{I3}& \text{$1$} & \text{$1$}  & \text{$2$} & \text{$1$} \\\hline \textbf{I4} & \text{$2$} & \text{$1$} & \text{$2$}  & \text{$1$} \\\hline \end{array}$$

The output of  $I1$ for $i = 2$ will be available after

  1. $\text{11 ns}$
  2. $\text{12 ns}$
  3. $\text{13 ns}$
  4. $\text{28 ns}$

5 Answers

Best answer
65 65 votes
$$\begin{array}{|c|c|c|c|c|} \hline \textbf{}  & \textbf {t1} & \textbf {t2} & \textbf {t3} & \textbf {t4} & \textbf {t5} & \textbf {t6} & \textbf {t7} & \textbf {t8} & \textbf {t9} & \textbf {t10} & \textbf {t11} & \textbf {t12} & \textbf {t13}  \\\hline \textbf{I1}& \text{$s _1$} & \text{$s _2$}  & \text{$s _2$} & \text{$s _3$} &  \text{$s _4$} &  \text{$s _4$} \\\hline \textbf{I2} & & \text{$s _1$} & \text{$ s _1$} & \text{$ s _2$}  & \text{$s _3$} & \text{$s _3$} & \text{$s _4$}\\\hline  \textbf{I3}& & & &\text{$s_1$} & \text{$s_2$}  & \text{--}&\text{$s_3$} & \text{$s _3$}  & \text{$s _4$}\\\hline \textbf{I4} & &&&&\text{$s_1$} & \text{$s_1$} & \text{$s_2$} & \text{--} & \text{$s_3$} & \text{$s _3$}& \text{$s _4$}\\\hline \textbf{I5} & &&&&&&\text{$s_1$} & \text{--} & \text{$s_2$} & \text{$s _2$} & \text{$s_3$} & \text{$s _4$}& \text{$s _4$}\\\hline \end{array}$$

So, total time would be $13\;ns$

Option (c).
edited by
0 0 votes

Silly mistake should be taken care of

Remember we have to find second iteration of Instruction I1 finish time.

Answer:
Position:
Show:

Related questions

78 78 votes
11 answers 11 answers
33.2k
33.2k views
go_editor asked Sep 28, 2014
33,166 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...
196 196 votes
8 answers 8 answers
76.4k
76.4k views
Kathleen asked Sep 22, 2014
76,445 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.0k
35.0k views
Kathleen asked Sep 12, 2014
34,960 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...
77 77 votes
8 answers 8 answers
38.1k
38.1k views
Ishrat Jahan asked Nov 2, 2014
38,120 views
The storage area of a disk has the innermost diameter of $10$ cm and outermost diameter of $20$ cm. The maximum storage density of the disk is $1400$ bits/cm. The disk ro...