edited by
19,204 views
39 votes
39 votes

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

  1. Function locals and parameters

  2. Register saves and restores

  3. Instruction fetches

  1. $\text{I}$ only
  2. $\text{II}$ only
  3. $\text{III}$ only
  4. $\text{I}, \text{II}$ and $\text{III}$
edited by

3 Answers

Best answer
41 votes
41 votes
  1. Functions locals and parameters
    this is true because overlapped registers eliminates the need for memory accesses. we here got to use registers instead.
     
  2. Register saves and restores
    this is false bc we need to see where memory accesses are reduced here before also we were using register as it says Register saves... later also (i.e. after using multiple register windows) registers will are referred. So NO memory accesses are reduced here.
     
  3. Instruction fetches
    it has nothing to do with reduction in memory accesses.

Hence, option (A) is correct.

edited by
4 votes
4 votes
3 votes
3 votes
→ 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.
Answer:

Related questions

51 votes
51 votes
7 answers
4