Answer to Question #265109 in Electrical Engineering for saurav kumar

Question #265109

Explain the process followed by CPU while completing the interrupts and resuming to instructions with proper steps.

Expert's answer

Interrupts are Signals which need immediate attention and perform operation generally stored in Interrupt Service Routine (ISR), ISR contains instruction which CPU should perform on occurrence of Interrupt , these instructions are located in some part of memory. Interrupts may be due to Hardware or Software , Example of a software interrupt is divide by Zero , Hardware interrupts may be due to internal or External devices.

CPU should stop its present operation, perform instructions contained in ISR, and after completing , it should resume the operations, it was performing prior to executing ISR.

The detailed operation may differ from one system to another but the concepts may be summarized as follows

  1. Normally after execution of each Instruction CPU checks whether there is any interrupt.
  2. Next step is what to do after interrupt is detected. To answer this part we take example of typical. 8086 processor
  3. To find ,where are ISR instructions located : In a typical 8086 processor has a vector table. it contains interrupt numbers and address of ISR corresponding to Interrupt numbers
  4. CPU needs to know the interrupt number . For external interrupts , the instruction no's for external hardware ,are generally conveyed by external Interrupt controllers and writing the code of Interrupt service Routine for these interrupts is also is job of Programmer/Designer.
  5. For certain software interrupts the interrupt numbers are fixed.
  6. On getting the interrupt number CPU gets the address of. ISR from vector table and prepare itself for handling the interrupt
  7. Before an Interrupt is going to be executed the address of the instruction of running program, which CPU should perform after executing ISR should be stored somewhere , as also the status of flags , the processor Id or any other information required for coming back to present program.
  8. After executing ISR, CPU based on above information resume its operation

These are some of the basic Operation which are required ,

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be the first!

Leave a comment

New on Blog