GATE 2008
March 14, 2025GATE 2008
March 14, 2025GATE 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
I only | |
II only | |
III only | |
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.
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.
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.