Question: The procedure ContextSwitch is called whenever there is a switch in context from a running program A to another program B. The procedure is a

The procedure ContextSwitch is called whenever there is a switch in context from a running program A to another program B. The procedure is a straight-forward assembly language routine that saves and restores registers, and must be atomic (i.e., unbreakable). Something disastrous can happen if the routine ContextSwitch is not atomic.

(i) Explain why ContextSwitch must be atomic, possibly with an example. (ii) Explain how the atomicity can be achieved in practice (Hint: It has something to do with interrupts).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!