Interrupt Handling

The interrupt manager component of the operating system is responsible for maintaining the interrupt context for the system. It dispatches hardware interrupts to device drivers which are registered for those interrupts. The interrupt manager is also responsible for supervising the use of the programmable interrupt controller (8259 PIC). Since performance is always a major issue in interrupt handing, particularly with time-critical applications, special considerations have been taken to ensure the maximum possible performance levels.

The functions performed by the interrupt manager are basically similar to those implemented for previous versions of OS/2. The interrupt manager provides the following:

  • High-performance routing of interrupts to device drivers

  • Compatibility with 16-bit DevHlp() interfaces

  • Support for PS/2-like interrupt devices (level-triggered interrupt sharing)

  • Support for PC AT-like interrupt devices (edge-triggered interrupts)

  • Efficient interrupt packaging/adaptation for OEM extensions.

    The internal implementation of the interrupt manager is very similar to previous versions of OS/2. The only major difference between the interrupt manager in OS/2 Version 2.0 and previous versions is that real mode interrupt handling is no longer supported; this method of interrupt handling is no longer needed due to the provision of the Multiple Virtual DOS Machines feature in OS/2 Version 2.0, which supports DOS applications as virtual 8086 mode tasks. All hardware and software interrupts from virtual 8086 mode tasks in an 80386 system cause a switch to protected mode. Thus interrupt requests issued by DOS applications are translated to the appropriate protected-mode device service requests by the virtual DOS machine. This process is explained more fully in OS/2 Version 2.0 - Volume 2: DOS and Windows Environment.

    Upon servicing an interrupt, the interrupt manager reschedules all threads currently pending in the system. This rescheduling is done to ensure that high priority threads are scheduled and dispatched as soon as possible. The only exception is the operating system kernel, which cannot be preempted. Forced actions such as Ctrl+Break or DosKillProcess() must be serviced before more application code is executed. This priority is necessary to avoid situations where a process is terminated by the user and an instruction from this process is then executed before the operating system processes the interrupt. Interrupt priorities are therefore checked by the interrupt manager upon receiving each interrupt.


    [Back: 32-Bit Application Support]
    [Next: Signal and Exception Handling]