While Watchdog Timer is more so an external-to-the-cpu system for embedded systems, I'm not sure if there's a word for it in the software world other then some form of timeout?
A watchdog timer is so named because it watches for some undesirable condition (usually a hang) and takes action if the condition lasts too long. This sort of auto-rollback is not that because it doesn't detect if something is bad, just rolls it back unless you tell it not to.
Actually I think a watchdog timer doesn't watch anything except it's timer.
> A watchdog timer is an electronic timer that is used to detect and recover from computer malfunctions. During normal operation, the computer regularly resets the watchdog timer to prevent it from elapsing, or "timing out".
It doesn't care about the state of anything except it's timer, and the only way to prevent it from activating is to reset the timer or disable the watchdog altogether.
That would still make sense in terms of auto-roll backs. You can't trust the state as a miss-configuration makes it unreliable.
The only difference I see from "auto-rollbacks" and "watchdog timers" is that watchdog timers are usually meant to be permanent, while auto-rollbacks are temporary (once you confirm it the auto-rollback never occurs again).
> Actually I think a watchdog timer doesn't watch anything except it's timer.
That's exactly how they work. A watchdog is a just a timer with a reset input and expired output, and perhaps a register for the timer period.
A practical example would a be a watchdog that ensures a control loop is in fact running, if not, reset the CPU. Let's say our control loop has a cycle never longer than 10ms. So we set the watchdog timer to 10ms. You wire the watchdog expired output to the reset pin of your CPU and put a line of code at the end of your control loop that sends a reset signal to the watchdog on each loop. If the program halts, the watchdog is allowed to expire firing the reset signal which will hopefully bring the system back without intervention.
Seen an old JK laser with a two stage hardware watchdog. The engineer who worked on it said the first stage was tied to the NMI pin of the 6809 CPU which resets the control software to a safe state. If that failed, the second stage timed out which meant that something was really wrong (cpu/memory fault) and would shut the machine down.
I guess I was thinking of the periodic timer reset as part of the watchdog mechanism. Maybe another difference is whether the interaction with the timer is manual.
A watchdog timer is typically a timer that's linked to some hard reset of the CPU/system. The system must "kick" the watchdog before it times out (every single time) in order to stay running.
https://en.m.wikipedia.org/wiki/Watchdog_timer