Disabling interrupts from within a DOS application running in a VDM may cause severe problems. If an error or program loop occurs while interrupts are disabled, the condition cannot be handled correctly and the system may crash.
To prevent a DOS application running in V86 mode from disabling interrupts for an extended period of time, a hardware timer is provided by the 80386 processor known as the watchdog timer. Such lengthy disabling may cause unrecoverable system errors. The watchdog timer is programmable and generates non-maskable interrupts (NM) after a specified period of time which allow an operating system to detect an errant 8086 application and terminate it. OS/2 Version 2.0 provides a hardware interrupt manager. This maintains a time counter for every VDM. All interrupts, except NMI, are checked by this hardware interrupt manager, which resets the time counter with every occurrence of an interrupt for the corresponding VDM.
If a counter exceeds a predefined limit (a typical value is 60 milliseconds), interrupts are automatically re-enabled. The Virtual DOS Machine Manager is notified of the ill-behaved application program, and will then terminate the VDM.