The Computer Science text book I own describes how an interrupt is handled in an operating system:
- At some point at the end of an instruction the processor checks if there are any outstanding interrupts
- If there are, the priority of the present task is compared with the highest priority interrupt
- If there is a higher priority interrupt, the current job is suspended
- The contents of the special registers are stored so that the job can be restarted later (aren't general purpose registers preserved as well? or do ISRs do not use these?)
- Interrupts are then serviced until all have been dealt with
- Control is returned to the original job
- If the current task has more priority than the interrupt, it is queued and serviced later
The last point "If the current task has more priority than the interrupt, it is queued and serviced later". Does this mean that if an I/O interrupt is generated but the current tasks are all very high priority, they will not get serviced (ignored)? moreover, how does the computer determine when to service these if the current task is more "important"?