INtime SDK Help
Spindoctor (spindoctor.rta)
INtime SDK v7.1 > INtime Utilities > Spindoctor (spindoctor.rta)

Checks for spinning threads

Command Line

spindoctor.rta

Description

To keep all processes responsive, it is important, that there is some execution time left for low priority threads. In case the system is busy with only high priority threads for a time longer than 3 seconds, the spindoctor can detect such situations. Originally the tool was designed to keep Windows responsive, even if a thread does not leave any processing time to low priority threads (in a shared mode configuration the low priority thread was Windows). With dedicated mode, the only mode available since INtime 7, the spindoctor can help to track down badly executing threads. Usually every thread running should leave some time for lower priority threads, which can be achieved by waiting for some data object or sleeping. Spindoctor helps to identify such threads, not leaving any process time for others. If the thread does not return within 3 seconds, an exception 0xffff is thrown and the thread is therefore interrupted. In debug environments, this exception will be caught by Visual Studio, if not handled within the application itself. A process may register a data message box named HW_FAULT_MBX and will receive the exception, in case one of its threads does not return from active state for 3 seconds. The message is of type HWEXCEPTIONMSG with an wException code of 0xffff. After receiving this "spindoctor" exception, the handler can suspend the spinning thread and initiate recovery options. These options will need to be application specific.

Configuration

Spindoctor usually is started from the autoload section in INtime node configuration. In development environments spindoctor is enabled by default, for runtime environments it is disabled by default.  

See Also