Addressing Modes- Q2

+1 vote
A RISC processor has 208 registers, 16 register windows. Each window has 4 inputs, 8 local and 4 output registers. The total number of global registers are ?
asked Jun 4 in Computer Organization by gbmentor (6,810 points)
edited Jun 6 by getgatebook

2 Answers

+3 votes
 
Best answer

In register window concept total number of regiters are divided in to windows.Each window is used to store a procedure's local variables and input parameters and  and  output parameters when it is called. 
Caller procedures output parameter registers are callee procedures input parameters. 


When program moves from one procedure to other procedure (Procedure1 calls procedure 2) then new window of registers are allocated to new procedure. This nested ness will be supported for maximum length 16. If it excedes 16 then 1st register window will be used and before that the content of the 1st window will be moved to memory. 
Advantage of this model is lesser no of data movements from memory to registers. 

One more important detail about this model is input registers of callee is shared with output registers of caller. Why ? (Easy think about it) 

So now total no of registers = Global registers + no of windows ( local registers per each window + input/output parameter registers)

208 = Global registers + 16(8 + 4) 

208 = Global registers + 192 

Global registers = 208-192 = 16 
 

answered Jun 6 by getgatebook (22,080 points)
thanks, sir for detailed solution
0 votes
@getbook

Please provide a detailed solution to this question.

Also, I think the window size should have been given in the problem

@Sir please look at it
answered Jun 5 by soumyadeeppro20 (1,640 points)
Answer:
...