Discussion Forum

Interative Forum for discussing any query literally to UGC-NET Computer Science, GATE Computer Science and Computer Sciene and Technology in general.

ugc_net image

UGC-NET Computer Science

Correspondence Courses and Test Series to prepare for UGC-NET computer science and applications

GATE image


MCQs, Lecture Notes, Ebooks for GATE preparation

freestuff image
jobs image

Jobs Newsfeed

Timely information of various Recruitments.


Computer organization Notes

Interrupt and its Types

In the process of executing a program, the CPU may be interrupted by a number of signals called interrupt. Interrupt is a temporary break in CPU’s normal execution of a program. Interrupt is used to handle a variety of problems that arise out of normal sequence of operations. Interrupt refers to the transfer of program control from currently running program to another program as a result of some internally or externally generated request.
These interrupts are identified by their type. There is an interrupt vector table (IVT). This table stores all the interrupt types & the address of their corresponding interrupt handler. Every interrupt is associated with a subroutine (function), also called a service routine or interrupt handler which will handle the interrupt. When the CPU encounters an interrupt, it looks up the IVT for matching interrupt type & gets the address of its service routine. It then transfers the control from the currently running program to the service routine. Control returns to the original program after the service program is executed. In order to return to the same stage of the previous program where it had left, certain things need to be saved before jumping to a service program. These are:
(a) The content of the program counter (PC).
(b) The contents of all processor registers.
(c) The contents of status register.
These interrupt can be categorized into following types.
(a) External interrupt
(b) Internal interrupt
(c) Software interrupt
(d) Maskable interrupts
(e) Non maskable interrupts
(f) Vectored interrupts
(g) Non vectored interrupts
(h) Priority interrupts
(1) External Interrupts
External interrupts include interrupts from some external devices such as from an I/O device when a data needs to be transferred or when data transfer is finished. This may also occur from an external timing device when some timeout has occurred or from a power monitoring device when a power failure has occurred .
(2) Internal Interrupts
Internal interrupts arise due to illegal or erroneous use of an instruction or data. These include errors resulting out of incorrect program syntax or logic. This would include both compile time and run time errors. Internal interrupts are caused by programs and not by any external devices. Internal interrupts are also called traps. Examples are division by zero error, register overflow error, stack overflow error etc.
(3) Software Interrupts
Software interrupt is initiated by executing an instruction. It is a special instruction that behaves like interrupt. It is a system call instruction. Software interrupt takes place when an application program calls a supervisor program such as operating system. It occurs under such conditions when a user program requests the operating system for handling some special, privileged operations such as input output operations. This type of interrupt is always internal interrupt.

(4) Maskable Interrupts
These are the interrupts whose handling can wait. When such interrupts arrive, CPU acknowledges the interrupt, completes its current cycle & then handles it.
(5) Non Maskable Interrupts
These are the interrupts whose handling can’t wait. When such interrupts arrive, CPU has to handle it immediately. E.g. Pressing reset button immediately resets the system.
(6) Vectored Interrupts
If the interrupting device supplies the address of its handler, it is vectored interrupt. i.e. after receiving interrupt, the branch address where CPU has to transfer control is provided by the device itself.
(7) Non Vectored Interrupts
If the address of interrupt handler is fixed in advance, it is non vectored interrupt. i.e. after receiving interrupt, the branch address where CPU has to transfer control is not provided by the device but it is fixed in advance.
(8) Priority Interrupts
When many devices are active at a time, they may send interrupt signals at the same time. Then there should be some mechanism to decide which interrupt to handle first. Also when an interrupt is being processed, another interrupt arrives. It has to be decided whether to continue with the existing interrupt or to handle new interrupt first. Above decisions can be made on the basis of some priority. So such interrupts are priority interrupts.

You can obtain Printed Copies of this material by making a request at with a nominal print charges.


Return To Computer organization Topics