OS-Interrupt Processing and Classes

INTERRUPT PROCESSING:

An interrupt is an event that alters the sequence in which a processor executes instructions. It is generated by the Hardware of the computer system. When an interrupt occurs.
  1.  The operating system gains control.
  2.  The operating system saves the state of the interrupted process. In many systems this information is stored in the interrupted process’s PCB.
  3.  The operating system analyzes the interrupt and passes control to the appropriate routing to handle the interrupt.
  4.  The interrupt handler routine processes the interrupt.
  5.  The state of the interrupted process is restored.
  6.  The interrupted process executes.
An interrupt may be initiated by a running process called a trap and said to be synchronous with the operation of the process or it may be caused by some event that may or may not be related to the running process it is said to be asynchronous with the operation of the process.

INTERRUPT CLASSES:

There are six interrupt classes. They are

* SVC (Supervisor Call) interrupts.

These are initiated by a running process that execute the svc is a user generated request for a particular system service such as performing input/output, obtaining more storage, or communicating with the system operator.

* I/O interrupts:

These are initiated by the input/output hardware. They signal to the cpu that the status of a channel or device has changed. For eg., they are caused when an I/O operation completes, when an I/O error occurs.

* External interrupts:

These are caused by various events including the expiration of a quantum on an interrupting clock or the receipt of a signal from another processor on a multiprocessor system.

* Restart interrupts:

These occur when the operator presses the restart button or arrival of restart signal processor instruction from another processor on a multiprocessor system.
* Program check interrupts:

These may occur when a programs machine language instructions are executed. These problems include division by zero, arithmetic overflow or underflow, data is in wrong format, attempt to execute an invalid operation code or attempt to refer a memory location that do not exist or attempt to refer protected resource.

* Machine check interrupts:

These are caused by multi-functioning hardware.
Share this article :
 
Copyright © 2012. Best Online Tutorials | Source codes | Programming Languages - All Rights Reserved