What is DPC Watchdog?
Solution 1:
what is the "DPC Watchdog"?
Summary:
Deferred Procedure Calls (DPCs) are monitored by a DPC Watchdog Timer.
When the DPC Watchdog Timer detects that a DPC is running for too long it generates a DPC_WATCHDOG_VIOLATION
error.
Detailed explanation
First of all you need to understand what a DPC is. A simplified explanation is:
A Deferred Procedure Call (DPC) is a Microsoft Windows operating system mechanism which allows high-priority tasks (e.g. an interrupt handler) to defer required but lower-priority tasks for later execution.
This permits device drivers and other low-level event consumers to perform the high-priority part of their processing quickly, and schedule non-critical additional processing for execution at a lower priority.
Source Deferred Procedure Call
Windows needs a mechanism to determine when something goes wrong with these Deferred Procedure Calls (they are taking too long to execute, and so degrading system responsiveness).
That mechanism is the DPC Watchdog Timer:
The operating system implements a DPC watchdog timer to detect when a single DPC routine runs for too long, or when a series of queued DPC routines runs back-to-back for too long.
If DPC time-out errors are enabled, and if either a DPC routine exceeds the time limit for a single routine, or a series of DPC routines exceeds the aggregate time limit, a DPC_WATCHDOG_VIOLATION (0x133) bug check occurs.
...
DPC routines should run only for brief periods, and should delegate as much processing as possible to worker threads. To avoid degrading system responsiveness, a typical DPC routine should run for no more than 100 microseconds each time it is called.
Source KeQueryDpcWatchdogInformation routine
Bug Check 0x133 DPC_WATCHDOG_VIOLATION
This bug check indicates that the DPC watchdog executed, either because it detected a single long-running deferred procedure call (DPC), or because the system spent a prolonged time at an interrupt request level (IRQL) of DISPATCH_LEVEL or above. The value of Parameter 1 indicates whether a single DPC exceeded a timeout, or whether the system cumulatively spent an extended period of time at IRQL DISPATCH_LEVEL or above.
DPCs should not run longer than 100 microseconds and ISRs should not run longer than 25 microseconds, however the actual timeout values on the system are set much higher.
Source Bug Check 0x133 DPC_WATCHDOG_VIOLATION