3.1 Watchdog Introduction
For a pure soft programmer like the author who has not played hardware, the first time I saw this guy, I really confused, but I thought it was a very interesting name. A survey found that the watchdog mechanism originated from the hardware, in the computer system, the single-chip microcomputer work is susceptible to interference from the external electromagnetic field, and into the dead loop, the system can not continue to work, in order to solve this problem, it has produced a special monitoring of the single-chip program running state of the chip, commonly known as " Watchdog "(Watchdog).
The "watchdog" itself is a timer circuit, and the internal timing (or counting) operation is constant. The computer system and the "watchdog" have two pins connected to the "watchdog" signal at regular intervals through one of the pins, and when the "watchdog" receives the signal, it cleans the timer 0 and restarts the chronograph. And once the system has a problem, into the dead loop or any blocking state, can not send a signal in time to let "watchdog" Timer Zero, when the time is over, "watchdog" will send a "reset signal" to the system through another pin, let the system restart.
In this way, the "watchdog" sends a signal like "feed the Dog", the timer is the "watchdog" stomach, when the time is over, the dog is hungry, one bite to kill the system, let it reborn.
The idea and influence of watchdog technology on software is similar, for example, Linux comes with watchdog. Let's take a look at the puppy of the Android system process.
Watchdog of the system process [go]