Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Watchdog timer
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Software watchdogs=== Some software watchdog timers are implemented as standard software modules. Examples of these include "Softdog", a [[Device driver#Virtual device drivers|virtual device driver]] which emulates an electronic WDT and conforms to the [[Linux]] watchdog API,<ref name="softdog"/> and [[MathWorks]]' Software Watchdog Timer, a retriggerable one-shot timer which can be instantiated by dragging its GUI representation onto a block diagram.<ref name="mathworks"/> Other software WDTs are typically custom-designed to meet specific requirements. Every software WDT depends on a timing reference to allow it to accurately track the passage of time. Various mechanisms are commonly available for this purpose. Depending on the computer, and if used, the [[operating system]] (OS), such mechanisms may include programmable interval timers, kernel timers, the [[system clock]], and synchronization objects (e.g., [[semaphore (programming)|semaphores]]) that support timed waits. The design of a software WDT can be influenced by a number of factors, including the length of the watchdog interval, the time references available for WDT use, CPU loading, how soon the WDT must be kicked after relevant conditions have been met, whether the computer is running an OS and, if so, whether the WDT is intended to run in user or kernel mode. For example, in bare metal applications (program running without an OS), timing references are often limited to [[programmable interval timer]]s (PIT). In such cases, the WDT might be implemented with a PIT in a fashion similar to the [[flowchart]] shown below: [[File:Flowchart sw wdt pit.svg|500px|center|alt=Flowchart for a software watchdog timer based on a programmable interval timer (PIT), with example application program]] In the above example, if the application program fails to kick the watchdog (by restarting the PIT), the PIT will reach the end of the watchdog interval and generate an interrupt request (IRQ). The associated interrupt service routine (ISR) will then execute and take corrective action via programmed I/O, system calls, or other software-controlled operations.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)