Any one of the fatal errors we have discussed so far will cause the mode to automatically change back to privileged so that the OS can clean up after the offending job. But there needs to be a kinder, gentler way to change back, and it is called a trap or supervisor call. An unprivileged machine instruction does it. Even user programs can call it, and in fact they must since this is the only way they can voluntarily return the system's state to privileged mode. Many computer systems call this instruction trap and use a mnemonic like TRP. IBM mainframes call it a supervisor call, since they sometimes call their operating systems the supervisor. Their mnemonic is SVC. We will use the term trap from here on. |