![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: Can you please explain the various IPL levels and what type functions occur at each level. The Answer is : IPL stands for Interrupt Priority Level. This is one of several synchronization mechanisms used by the operating system to coordinate and control the use of various physical and logical resources. Normal user code always runs at IPL 0. Often, IPLs are described in terms what operations can NOT occur at a particular level, rather than what operations CAN be performed. This is because changing IPL is usually done to BLOCK certain operations. Think of IPLs as being a series of work queues. Different tasks get scheduled on different queues. When looking for something to do, the system will take the first entry off the highest numbered queue. Only after all entries on a queue have been completed will a lower numbered queue be addressed. Some entries are posted by hardware events, others may be posted by software events. When an event gets posted to a higher queue than the current IPL level of the current thread, the thread is interrupted to service the higher priority event. Software threads can change their IPL up or down to block events that will be scheduled on lower IPL queues There are some fairly complex rules that dictate exactly when and how IPL can be changed, especially downwards. For complete details you would need to read the Internals and Data Structures Manual, but here is a very brief and highly simplified description of some of the more popular IPL levels. IPL 31 IPL$_POWER - blocks ALL interrupts used to initialise the system or to crash the system IPL 30 powerfail used to notify the system that power has failed IPL 24 or 22 (varies depending on hardware) hardware clock interrupt DEVICE IPLs - specific to the device FORK IPLs - see IDSM, used to allow device drivers to lower IPL in a consistent manner IPL 8 IPL$_SYNCH - used to control access to various system wide data structures, such as the scheduler data base, lock manager and cluster communications. IPL 7 - Software timer interrupt IPL 6 IPL$_QUEUEAST - used to deliver ASTs IPL 4 - used for I/O post processing IPL 3 - the resheduling interrupt IPL 2 - used to block delivery of all ASTs at all modes, as a consequence it also blocks process deletion and suspension Note that the IPL mechanism can only effectively synchronise multiple threads of execution on a SINGLE CPU. For that reason, most IPL levels also have an associated spinlock to allow synchronisation with other CPUs in an SMP environment.
|