< previous page page_36 next page >

Page 36
0036-01.gif
Figure 1.16
An example of a program status word (PSW).
3. Current instruction length: the number of bytes to be added to the PC.
4. Mask bits to enable or disable floating-point/fixed point/decimal overflow.
5. Odd or even parity information.
and system information pertaining to the particular user:
1. User id: a pointer to the address regions that belong to this particular user.
2. Protection information.
3. Supervisor/user state: an indication of whether the user program or the operating system is being run.
4. Wait/run state: an indication of whether useful work is being performed.
5. Machine check mask enable: if an error occurs, processing may either cease or continue (perhaps to retry an operation or to run a diagnostic program).
6. I/O channel mask(s): a particular program may not wish to be interrupted to be notified that certain I/O information is available.
Mainframes generally have a large PSW that includes all of the preceding features, while most microprocessers have a simpler PSW, including user defined condition code, user-enabled arithmetic masks, trap indicator for program debugging, and a system-defined access code to indicate the level of privilege of the routine that called the current process.
Sequencing: Task-to-Task and Task-to-Supervisor
Control must pass from one program module to another in an orderly fashion, and when its execution is complete, control must be returned to the program module that called it. Three types of events may force program control to move from one module to another:

 
< previous page page_36 next page >