An interrupt is a signal from a device attached to a computer or from a program within the computer that requires the operating system to stop and figure out what to do next.The computer simply takes turns managing the programs that the user starts.
Different types of interrupts
- TYPE 0 interrupt represents division by zero situation.
- TYPE 1 interrupt represents single-step execution during the debugging of a program.
- TYPE 2 interrupt represents non-maskable NMI interrupt.
- TYPE 3 interrupt represents break-point interrupt.
- TYPE 4 interrupt represents overflow interrupt.
An example of an interrupt is a signal to stop Microsoft Word so that a PowerPoint presentation can gear up. A signal that gets the attention of the CPU and is usually generated when I/O is required.For example, hardware interrupts are generated when a key is pressed or when the mouse is moved.
When an interrupt occurs, it causes the CPU to stop executing the current program. The control then passes to a special piece of code called an Interrupt Handler or Interrupt Service Routine.The interrupt handler will process the interrupt and resume the interrupted program.
No comments:
Post a Comment