Question

In: Computer Science

3. In a typical service routine, to go back to the previous code we do RTI....

3. In a typical service routine, to go back to the previous code we do RTI. Suppose we replace RTI by a sequence of two instructions:


POPpc

POPpsw


The POPpc instruction will pop the PC value from the control stack (assume that PC, PSW values are on the stack in the right order) and put it into the PC register. The POPpsw instruction will pop the PSW value from the control stack and put it in the PSW register.

Assume that all logical addresses are the same as the physical addresses.

Will this scheme work? Explain in LESS THAN 50 WORDS.

Solutions

Expert Solution

Yes,this will work just fine.when a typical service routine is over,then it is required to fill the PC with the next address of instruction which was keep on hold to service that particular routine.

This functionality is actually automatic,when service routine is over,this will invoke pop operation which will then pop the PC and PSW values from control stack which were actually pushed when PC was initialised with address of service routine.

PSW is also required to continue effectively and to produce correct results.PSW contain Accumulator and flag registers which explicitly define the state of program upto where program was preempted.this state information is also required because in most cases instructions are dependent on each other.without this information ,program can't be executed effectively if they execute somehow then it is not guaranteed that it will generate correct output.


Related Solutions

How do I go back to the start of the main method with the given code?...
How do I go back to the start of the main method with the given code? Hello I am making this java program and there is a point in the code where if the user types the character y it will start the program back at the beginning of the main method. How can I do this without drastically changing the code? For instance, if I type y, the program will go back to line 1 and repeat the entire...
Suppose a user wants to do a system call. Assume that the service routine of this...
Suppose a user wants to do a system call. Assume that the service routine of this system call is at physical address 500., instead of executing a system call, the user simply jumps to this location 500. Assume that logical and physical addresses are the same and no memory protection is in place, i.e., cpu does not check that this address 500 is beyond the user’s memory space. Will something go wrong while the service routine executes?
This is in Python: Alter your code for previous Do It Now problem, with the change...
This is in Python: Alter your code for previous Do It Now problem, with the change that the row should only be printed by the second number that the user enters. For example, the user enters two numbers of 5 and 7 for the two input lines in the code, and the following will be printed: 5 x 1 = 5 5 x 2 = 10 5 x 3 = 15 5 x 4 = 20 5 x 5 =...
Do you think the economy is self-regulating? Do you think economies will always go back to...
Do you think the economy is self-regulating? Do you think economies will always go back to its potential as Classical view believes? Briefly discuss.
Do you think the economy is self-regulating? Do you think economies will always go back to...
Do you think the economy is self-regulating? Do you think economies will always go back to its potential as Classical view believes? Briefly discuss.
Do you think the economy is self-regulating? Do you think economies will always go back to...
Do you think the economy is self-regulating? Do you think economies will always go back to its potential as Classical view believes? Briefly discuss.
Explain Bringing Human Resources Back into Strategic Planning Copy and Paste. Do not use previous answers.
Explain Bringing Human Resources Back into Strategic Planning Copy and Paste. Do not use previous answers.
3. In a previous election, we were wondering if president Obama would be re-elected. We took...
3. In a previous election, we were wondering if president Obama would be re-elected. We took a random poll of 1057 Americans and asked them if they would vote for Obama to be re-elected. Of the 1057 people in the poll, 583 said they would support Obama. Is this evidence convincing enough for us to know if more than 50% of all Americans would vote to re-elect president Obama? To answer this question we will look at simulations from a...
how do we interpret how typical a score is compare to the population based on the...
how do we interpret how typical a score is compare to the population based on the population mean and standard deviation
How would you react to the typical “this is how we do things here” response to...
How would you react to the typical “this is how we do things here” response to change? How can you help the employees make their transition from the unawareness stage to the action stage (stages in the acceptance of individual transition)? Specially thanks to the change curve we can predict people’s emotions and reactions to change. in reference with ringtone: exploring the rise and fall of nokia in mobile phones
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT