Jonathan Scott said:
Various bits of computer-based equipment contain separate "watchdog timers" that will reset or restart them if they aren't reset within a time limit. Is that what you mean?
Jonathan Scott wins the round.
A "watchdog circuit" and "watchdog timer" is, in the technical jargon, just called the "watchdog." It consists of a hardware based timer that resets the device if it expires. If not reset in an appropriate interval of time, the watchdog resets the device.
If you own a cellphone, you own a watchdog. Your cellphone's modem processor contains a watchdog. A watchdog is not limited to cellphones though.
I mentioned that a watchdog is not a standalone device. It goes with something else. That something else (whatever it is) must
- Kick with watchdog
- Pet the watchdog
- Feed the watchdog
periodically. And in this context, kick, pet or feed the watchdog mean exactly the same thing: reset the timer. This involves the software triggering a specific address (a "memory" address known to the software which is really a hardware register address). This triggers the hardware watchdog to reset its timer. If the hardware timer expires, it resets the device. I mentioned the "most simplest of things" in my original description, because this amounts to a single bit (1 or 0) within the address that needs to be periodically written.
Software in an embedded device can "go off into the weeds" so to speak for a number of reasons including a software bug, hardware bug or even a rare interaction with a cosmic ray that toggles a bit in memory (this is rare but it does happen). If such a thing happens in an embedded device, and that device contains a watchdog, the device will fail to kick the watchdog, and the watchdog will reset the device, and the system can recover. If the device does not contain a watchdog, or the watchdog is not implemented correctly, it requires the user to manually power cycle the device, which is a bad an horribly annoying thing.
The watchdog implementation needs to be done in hardware though (at least in part). It can't be done purely in software since software operation is one of the things it's keeping tabs on.
The modem processor in a cellphone has its own watchdog. The modem processor software is responsible for kicking the watchdog within a certain time interval. If it doesn't the watchdog resets the phone.
In older phones (think clamshell phones [read not smartphones]) the phone containes a single processor that controls the modem and user interface (UI) (and perhaps digital signal processors [DSP] which are ignored in this post). If the software crashes (for whatever reason) it ceases kicking the watchdog, and the watchdog resets the phone. The user might not even notice.
If this didn't take place, the phone would just be "frozen" and require a hard reboot just to recover. And in the worst hypothetical case, the phone might end up transmitting garbage, potentially jamming other cellphones on the cellular network. That's why cell phones always have watchdogs -- to protect the network if nothing more.
And, without a watchdog, the UI is possibly unresponsive, requiring the user to manually, and painstakingly, take the phone apart and remove the battery to power cycle thphone.
Modern smartphones are more complicated in this respect. Modern phones (certainly all smartphones) have separate modem processors from application processors (even if both processors are embedded within the same chip). The modem processors will certainly contain a watchdog, but not necessarily the application processor. So the application processor freezes up, you might have to painstakingly remove the battery to reset the thing, but you can at least rest assured that the modem isn't doing anything bad.
Watchdogs are not limited to cellphones though. They apply to any embedded device. Various embedded systems in your computer might (or might not) contain their own watchdog circuitry. If your video card crashes for example, and it contains a watchdog, the system can recover without rebooting the entire system, and without relying on the software drivers to reboot the thing.
Have you ever had to manually power-cycle your router/WLAN? If so, it was because it didn't properly implement a watchdog (and probably had bugs). The lack of watchdog was either poor implementation or was ignored as a cost savings measure. If the thing implemented a watchdog, even if it was buggy it would automatically reset itself rather than requiring you to manually power cycle the damned thing, which is incredibly annoying.
http://en.wikipedia.org/wiki/Watchdog_timer
Instead of relying on Kyle, a properly implemented watchdog can do this for you automatically:
https://www.youtube.com/watch?v=ckIMuvumYrg
So, Jonathan Scott, good job, and it's your move.