...
GATE 2008
March 14, 2025
GATE 2008
March 14, 2025
GATE 2008
March 14, 2025
GATE 2008
March 14, 2025

GATE 2008

Question 37

The use of multiple register windows with overlap causes a reduction in the number of memory accesses for

    I. Function locals and parameters
    II. Register saves and restores
    III. Instruction fetches
A
I only
B
II only
C
III only
D
I, II and III
Question 37 Explanation: 
I is true because when we make a function call there are some input registers and some output registers. If function F() is calling function G(), we can make the caller function F()’s output registers the same as the called procedure G()’s input registers this is done using overlapping register windows.This will reduce the memory accesses so that F()’s output need not be put into memory for G() to access again from memory.
II is false as register saves and restores would still be required for each and every variable.
III is also false as instruction fetch is not affected by memory access using multiple register windows.
Correct Answer: A
Question 37 Explanation: 
I is true because when we make a function call there are some input registers and some output registers. If function F() is calling function G(), we can make the caller function F()’s output registers the same as the called procedure G()’s input registers this is done using overlapping register windows.This will reduce the memory accesses so that F()’s output need not be put into memory for G() to access again from memory.
II is false as register saves and restores would still be required for each and every variable.
III is also false as instruction fetch is not affected by memory access using multiple register windows.

Leave a Reply

Your email address will not be published. Required fields are marked *