Tuesday, June 21, 2011

What happens when multiple interrupt occurs simultaneously? what is an Interrupt Vector? How are the interrupt recognized in microcomputers?

What happens when multiple interrupt occurs simultaneously? what is an Interrupt Vector? How are the interrupt recognized in microcomputers?

Ans An interrupt is a request from Vo or other devices to a processor for service or attention. An interrupt is any exceptional even that causes CPU to temporarily transfer its control from currently executing program to a different program which provide service to the exceptional event. Interrupts are generated for a variety of reasons usually related to the services related to external devices connected to the machine. Multiple interrupt may occurs simultaneously.
Multiple interrupt occurs when any currently executing program is interrupted by another program or process. If a program from a communication line and on another side may receive an instruction it is printing results, the printer on completion of every print operation will generate An interrupt, while the communication1ine controller will be generating the interrupt on arrival of a unit of data. Since, these two interrupts are independent, hence, the communication interrupt may occur while the printer interrupt is being processed. Multiple interrupts are handled in sequential order.

The scheme that can handle multiple interrupt at a time is to disable interrupts. If an interrupt occur while the first interrupt is being processed them it will remain pending, till the interrupts have been enable again. Therefore, in this scheme, the first few instructions in the processing of an interrupt disables other interrupts. After the interrupt service program for the current interrupt is completed, then the processor enables the interrupt and checks whether any other interrupt has occurred. Hence in this approach interrupts are handled in sequential order.

Depending upon the type of service desired, the interrupts are given a type. The service in the form of a procedure is called the interrupt service routine. In case, the first burst of data input is not processed before the second burst arrives, the data may be lost. When the CPU knows that an interrupt has occurred then the CPU execute an interrupt servicing program to service the interrupt.

Interrupt Vector: - The CPU processes on interrupt instruction using the interrupt vector Table (IVT). It is situated in the first 1k byte of memory and has a total of 256 entries each of 4 bytes. The entry in the IVT is identified by the number given in the interrupt instruction and points to an operating system subroutine. The actual address in this table varies from machine to machine. The device, which has made the interrupt request grabs the signal and responds by putting a word, which is an address of interrupt servicing program. This word is called on Interrupt Vector. This address is used for selecting an appropriate interrupt-servicing program.

A microcomputer has a programmable large-scale integrated microprocessor containing all the elements required to process binary encoded data. Providing a control line can interrupt the processor. This line connects the source of interrupts! to the processor. Then interrupt signal is stored in a register of the processor. This register is tested time to time by the processor to determine the occurrence of an interrupt. Once the processor known that an interrupt has occurred then the processor need to execute an Interrupt servicing program which tries to remove the condition which has caused the interrupt. The processor is assigned the address of the interrupt servicing program to be executed. The execution of an instruction in the processor is done using certain set of registers and their respective circuit. The essential context of the processor is saved either into a special save are in main memory or into a stack at the beginning of interrupt processing. This context is restored when the interrupt service program is finished therefore, the interrupted program execution can be restarted from the point of interruption. The instruction execution resumes as soon as the interrupt processing is completed. Therefore, the user instruction need not contain any special code for interrupt handling. This job lies with the processor and the operating system which are also responsible for suspending the execution of the user instruction and after interrupt handing resumes the user instruction from same point.

3 comments:

  1. Good explanation but... this is very difficult to read, please improve your English. :(

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete