OpenVMS IPLs
As an example of one of the more elaborate IPL-handling systems ever deployed, the VAX computer and associated VMS operating system supports 32 priority levels, from 0 to 31. Priorities 16 and above are for requests from external hardware, while values below 16 are available for software interrupts (used internally by the operating system to schedule its own activities). Not all values are actually used, but here are some of the more important ones:
- level 31 is for the "power-fail" interrupt.
- level 24 is for the clock interrupt. Note this is a higher priority than I/O interrupts.
- levels 20-23 are used for I/O devices.
- levels 8-11 are used for fork interrupts. When a driver receives a device interrupt (priority 20-23), it is supposed to do as little processing as possible at such a high priority; instead, if any time-consuming operations need to be done, these are to be deferred by requesting a software interrupt in the 8-11 range; when this interrupt is triggered, the further processing will resume. Similar to this are "bottom halves" and their successors in the Linux kernel.
- level 7 is used to synchronize access to the process scheduler data structures.
- level 4 is used for I/O post-processing tasks—that is, final completion of a QIO request including returning results to the application process.
- level 3 is used for the process rescheduling interrupt. Any code executing at higher interrupt levels is not allowed to assume that there was a current process context (since a process reschedule might be in progress). In particular, page faults are not allowed at this or higher levels.
- level 2 is used to synchronize access to per-process data structures. Any time the kernel needs access to a process context, it sends that process a special kernel AST which executes in the process context at IPL 2.
- level 0 is the normal level for execution of non-interrupt code, including ordinary application code.
Alpha hardware contains native support for IPLs. When OpenVMS was ported to Itanium in 2001, the IPL scheme was simulated using features provided by the Itanium hardware.
Read more about this topic: Interrupt Priority Level