Interruptions

The interruption is a mechanism to signal the CPU when certain conditions exist. For I/O interruptions the CPU is signaled when some event happens with an I/O device such as I/O operation complete or an error condition.  By using interruptions the CPU can initiate an I/O operation and does not have to continuously check the status to see if it has completed.  Instead when the I/O operation is complete the CPU will be signaled with an interrupt.

There are several classes of interrupts defined in the System 370 architecture.  Each interrupt class has two specific locations in low memory used to hold PSWs.  When an interrupt occurs the current CPU PSW is stored in the Old PSW location for the interrupt class and is replaced with the value of the New PSW location.

By loading a New PSW the state of the CPU is changed enabling the interruption condition to be handled.  When interruption handling is complete the Old PSW can be used to restore execution of the interrupted program.

Some interruptions can be “Masked” – that is ignored depending on settings in the current PSW.  For example while an I/O interruption is being processed all other I/O interruptions should be masked until completion of the current I/O interruption processing.

The classes of interruptions are:

Machine-Check Interruption Indicates an equipment malfunction.  When this interruption occurs the Old PSW is stored in location 48 and a new PSW is fetched from location 112.

Program Interruption Results from an error during the execution of a program (such as an invalid operation code or attempt to execute a privileged instruction while in problem state).  When this interruption occurs the Old PSW is stored in location 40 and a new PSW is fetched from location 104.

Supervisor Call Interruption Occurs when a Supervisor Call (SVC) instruction is executed. When this interruption occurs the Old PSW is stored in location 32 and a new PSW is fetched from location 96.

External Interruption Signals the CPU to conditions outside the system.  These interruptions include the operator pressing the Interrupt Key or when the Interval Timer is decremented and goes from a positive value to a negative value.  When this interruption occurs the Old PSW is stored in location 24 and a new PSW is fetched from location 88.

Input/Output Interruption Allows the CPU to be notified of various conditions for I/O devices and channels.  When this interruption occurs the Old PSW is stored in location 56 and a new PSW is fetched from location 120.  In addition a Channel Status Word (CSW) is stored at location 64.

Restart Interruption Allows the CPU to respond to an interruption generated by the operator pressing the restart key.  When this interruption occurs the Old PSW is stored in location 8 and a new PSW is fetched from location 0 (zero).

[Next – Input Output Basics]

Leave a Reply

Your email address will not be published. Required fields are marked *