Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose that a RISC machine uses 5 register windows. A) How deep can the procedu

ID: 3645813 • Letter: S

Question

Suppose that a RISC machine uses 5 register windows. A) How deep can the procedure calls go before the registers must be saved in memory? (Or, what is the maximum number of "active" procedure calls that can be made before we need to save any registers in memory?) B) Suppose two more calls are made after the maximum value from part (A) is reached. How many register windows must be savedto memory as a result? C) Now suppose that the most recently called procedure returns. Explain what occurs. D) Now suppose one more procedure is called. How many register windows need to be stored in memory?

Explanation / Answer

a) Since, one window (set) of registers can be visible by one procedure execution environment at any time. And N-Window register files can save only N-1 active procedures.

Thus depth of 4 procedures calls are allowed in the RISC with 5 register windows.

b) Minimum two window registers need to be saved to memory, to store the new procedure calls.

c) Since most recently saved window pointer is maintained, when a most recently called procedure returns (means when a register window becomes free), the most recently saved register window is restored back from memory.

d) Since already 4 register windows are filled, one register window need to be saved in memory in order to save the newly called procedure

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote