The CPU has to make a choice in this situation. Which one should it act upon. It will not know which one came first, so can not do first come first served. In this case, the CPU uses a simple priority table.

 

  • Hardware failure: Priority 1 (most important)
  • Reset interrupt: Priority 2
  • Program error: Priority 3
  • Timer: Priority 4
  • I/O: Priority 5

 

So in the example above, the hardware failure will be dealt with first.

Processes also have a priority which must be checked. If the currently running process has a higher priority than an interrupt then it will be ignored till that process has ended.