Watchdog timer
Encyclopedia
A watchdog timer is a computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

 hardware or software timer
Timer
A timer is a specialized type of clock. A timer can be used to control the sequence of an event or process. Whereas a stopwatch counts upwards from zero for measuring elapsed time, a timer counts down from a specified time interval, like an hourglass.Timers can be mechanical, electromechanical,...

 that triggers a system reset
Reset (Computing)
In a computer or data transmission system, to reset means to clear any pending errors or events and bring a system to normal condition or initial state usually in a controlled manner. It is usually done in response to an error condition when it is impossible or undesirable for a processing activity...

 or other corrective action if the main program
Computer program
A computer program is a sequence of instructions written to perform a specified task with a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute...

, due to some fault condition, such as a hang
Hang (computing)
In computing, a hang or freeze occurs when either a single computer program, or the whole system ceases to respond to inputs. In the most commonly encountered scenario, a workstation with a graphical user interface, all windows belonging to the frozen program become static, and though the mouse...

, neglects to regularly service the watchdog (writing a "service pulse" to it, also referred to as "kicking the dog", “petting the dog”, "feeding the watchdog" or "waking the watchdog"). The intention is to bring the system back from the unresponsive state into normal operation.

Watchdog timers can be more complex, attempting to save debug information onto a persistent medium; i.e. information useful for debugging the problem that caused the fault. In this case a second, simpler, watchdog timer ensures that if the first watchdog timer does not report completion of its information saving task within a certain amount of time, the system will reset with or without the information saved. The most common use of watchdog timers is in embedded system
Embedded system
An embedded system is a computer system designed for specific control functions within a larger system. often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal...

s, where this specialized timer is often a built-in unit of a microcontroller
Microcontroller
A microcontroller is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM...

.

Even more complex watchdog timers may be used in running untrusted code in a sandbox
Sandbox (computer security)
In computer security, a sandbox is a security mechanism for separating running programs. It is often used to execute untested code, or untrusted programs from unverified third-parties, suppliers, untrusted users and untrusted websites....

 by placing an upper bound on the CPU time available to the untrusted code and thus preventing some types of denial-of-service attack
Denial-of-service attack
A denial-of-service attack or distributed denial-of-service attack is an attempt to make a computer resource unavailable to its intended users...

.

Watchdog timers may also trigger fail-safe
Fail-safe
A fail-safe or fail-secure device is one that, in the event of failure, responds in a way that will cause no harm, or at least a minimum of harm, to other devices or danger to personnel....

 control systems to move into a safety state, such as turning off motors, high-voltage electrical outputs, and other potentially dangerous subsystems until the fault is cleared.

For those embedded systems that cannot be constantly watched by a human, watchdog timers may be the solution. For example, most embedded systems need to be self-reliant, and it is not usually possible to wait for someone to reboot them if the software hangs. Some embedded designs, such as space probes, are simply not accessible to human operators. If their software ever hangs, such systems are permanently disabled. In cases similar to these, a watchdog timer can help in solving the problem.

The watchdog timer is a chip external to the processor. However, it could also be included within the same chip as the CPU; this is done in many microcontrollers. In either case, the watchdog timer is tied directly to the processor's reset signal. Expansion card
Expansion card
The expansion card in computing is a printed circuit board that can be inserted into an expansion slot of a computer motherboard or backplane to add functionality to a computer system via the expansion bus.One edge of the expansion card holds the contacts that fit exactly into the slot...

 based watchdog timers exist and can be fitted to computers without an onboard watchdog.

See also

  • Immunity Aware Programming
    Immunity Aware Programming
    When writing firmware for an embedded system, immunity-aware programming refers to programming techniques which improve the tolerance of transient errors in the program counter or other modules of a program that would otherwise lead to failure...

  • Power distribution unit
    Power distribution unit
    A power distribution unit is a device fitted with multiple outputs designed to distribute electric power, especially to racks of computers and networking equipment located within a data center....

  • System time
  • Dead man's switch
    Dead man's switch
    A dead man's switch is a switch that is automatically operated in case the human operator becomes incapacitated, such as through death or loss of consciousness....

  • Keepalive
    Keepalive
    A keepalive is a message sent by one device to another to check that the link between the two is operating, or to prevent this link from being broken.-Description:...


External links


The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK