Noninterrupt and Interrupt-Level Execution
In prior releases of Mac OS there has been no clear distinction between application-level programming and system-level programming. Restrictions about when certain system services can be used and when they cannot are not fully defined.
In native driver model, different
execution levels have different restrictions. Noninterrupt (task level) execution may make use of nearly any operating-system or Mac OS ROM Toolbox service. Secondary interrupt routines and hardware interrupt handlers are allowed only a small subset of those services.
The discussion in this book uses the following definitions for execution levels:
-
Task level:
the noninterrupt level on which most code, including applications, is executed.
-
Hardware interrupt level:
the execution level of concern to driver writers. Hardware interrupt-level execution happens as a direct result of a hardware interrupt request. The software executed at hardware interrupt level includes installable interrupt handlers for PCI and other devices as well as interrupt handlers supplied by Apple.
-
Secondary interrupt level:
the execution level similar to deferred task execution in previous versions of Mac OS. The secondary interrupt queue is filled with requests to execute subroutines that are posted for execution by hardware interrupt handlers. The handlers need to perform certain actions but choose to defer the execution of those actions to minimize interrupt-level execution. Unlike hardware interrupt handlers, which can be interrupted by hardware interrupts and can nest, secondary interrupt handlers always run serially.
© 1999 Apple Computer, Inc. (Last Updated 26 March 99)