Managing Runaway Threads

The eRTOS watchdog timer can be used to monitor runaway real-time threads.

When a single real-time thread becomes CPU bound, it is often unintended and the result of a program logic error (which occurs most frequently during the development phase).

The eRTOS Scheduler can be configured to monitor for highly CPU-intensive real-time threads and notify the eRTOS kernel if there are any threads that run nonstop for greater than the period of time that you specify. When the watchdog timer is enabled, the kernel keeps track of the amount of time threads run continuously on each real-time core without yielding the CPU, and if any exceed the timeout period configured by the user, the kernel will generate a watchdog timeout exception which freezes all real-time threads, no matter which thread causes the exception.

Note: This feature is provided for debugging purposes only and is not recommended for deployment situations.

Note: After a watchdog timer exception occurs, the user is responsible for terminating all running Processes.

Note: The default watchdog timer period is 5 seconds.

Watchdog Management

When monitoring is enabled, the watchdog timer checks on every timer interrupt for continuous running of the same thread. When the watchdog timer expires, processes that were running at the time of the exception are frozen.

Upon timeout of the watchdog timer, the kernel freezes the offending process. All other running processes are frozen.

Notes