The Wayback Machine - https://web.archive.org/web/20230529052405/https://www.geeksforgeeks.org/gate-gate-cs-2012-question-46-2/
Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | GATE CS 2012 | Question 46

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Register renaming is done in pipelined processors

(A)

as an alternative to register allocation at compile time

(B)

for efficient access to function parameters and local variables

(C)

to handle certain kinds of hazards

(D)

as part of address translation


Answer: (C)

Explanation:

Register renaming is done to eliminate WAR (Write after Read) and WAW (Write after Write) dependency between instructions which could have caused pipieline stalls. Hence, (C) is the answer.

Example:

I1: Read A to B
I2: Write C to A

Here, there is a WAR dependency and pipeline would need stalls. In order to avoid it register renaming is done and 

Write  C to A
will be 
Write  C to A

WAR dependency is actually called anti-dependency and there is no real dependency except the fact that both uses same memory location. Register renaming can avoid this. Similarly WAW also. 
 


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Last Updated : 30 Sep, 2021
Like Article
Save Article
Similar Reads