retagged by
10,278 views
44 44 votes

If we use internal data forwarding to speed up the performance of a CPU (R1, R2 and R3 are registers and M[100] is a memory reference), then the sequence of operations

R1 → M[100]
M[100] → R2
M[100] → R3

can be replaced by

  1. R1 → R3
    R2 → M[100]
  2. M[100] → R2
    R1 → R2
    R1 → R3
  3. R1 → M[100]
    R2 → R3
  4. R1 → R2
    R1 → R3
    R1 → M[100]

3 Answers

Best answer
67 67 votes
Data forwarding means if CPU writes to a memory location and subsequently reads from the same memory location, the second instruction can fetch the value directly from the register used to do the write than waiting for the memory. So, this increases the performance.

Here, choices A, B and C doesn't really make any sense as the data was in R1 and it must be moved to R2, R3 and M[100]. So, (D) is the answer.
selected by
2 2 votes

Option A
here content of $R2$ is written to $M[100]$, but $R2$ doesn't have content of $R1$, so not even correct

Option B
here content of $R1's$ content is stored into $R2$ and $R3$, but $M[100]$ doesn't have content of $R1$

Option C
here $R2's$ content is written to $R3$, but $R2$ don't have content of $R1$ in the first place

Option D : Answer
The CPU avoids waiting for the slow memory $M[100]$ for the register operations. $R2$ and $R3$ get their data instantly from $R1$ inside the CPU, drastically speeding up the sequence and it is the only functionaly correct option
 

0 0 votes

Correct Answer: Option D

option a:  

R1 → R3
R2 → M[100] 

here only R3 have content of R1, but R2 and M[100] doesn't

option b: 

M[100] → R2
R1 → R2
R1 → R3

 here R2 and R3 have the content of R1 but M[100] doesn't

option c:

R1 → M[100]
R2 → R3

here only M[100] contains the value of R1 whereas R2 and R3 don't

option d:

R1 → R2
R1 → R3
R1 → M[100]

here all R2,R3 and M[100] contains the content of R1

therefore correct option is d

 

 

Answer:
Position:
Show:

Related questions

32 32 votes
8 answers 8 answers
10.2k
10.2k views
Ishrat Jahan asked Nov 2, 2014
10,212 views
In the TCP/IP protocol suite, which one of the following is NOT part of the IP header?Fragment OffsetSource IP addressDestination IP addressDestination port number
48 48 votes
7 answers 7 answers
18.2k
18.2k views
Ishrat Jahan asked Nov 2, 2014
18,174 views
A process executes the following segment of code :for(i = 1; i <= n; i++) fork ();The number of new processes created is$n$$((n(n + 1))/2)$$2^n - 1$$3^n - 1$
55 55 votes
6 answers 6 answers
19.1k
19.1k views
Ishrat Jahan asked Nov 2, 2014
19,114 views
Consider the following C program which is supposed to compute the transpose of a given $4 \times 4$ matrix $M$. Note that, there is an $X$ in the program which indicates ...
30 30 votes
5 answers 5 answers
7.9k
7.9k views
Ishrat Jahan asked Nov 2, 2014
7,940 views
Which one of the following binary trees has its inorder and preorder traversals as $BCAD$ and $ABCD$, respectively?