Aros/Platforms/x86 64 support - Wikibooks, open books for an open world
Driver on

The Linux Kernel/Softdog Driver – Wikibooks, open books for an open world

What’s a Watchdog Timer?[edit]

A watchdog timer is a tool that triggers a system reset if it
detects that the system has hung. A program working on the system
is meant periodically to service the watchdog timer by writing a
“service pulse.” If the watchdog shouldn’t be serviced inside a selected
time period, the watchdog assumes that the system has hung, and
triggers a system reset.

What’s Softdog?[edit]

Often, watchdog timers are applied as add-on playing cards, or as on-chip
peripherals inside microcontrollers. But when there isn’t any {hardware}
watchdog, the Linux kernel can present a software program watchdog applied
utilizing kernel timers.

Linux Watchdog Mechanism[edit]

In Linux, the watchdog driver offers a personality driver interface to
the consumer house. When some knowledge is written to the watchdog driver, the
watchdog driver providers the watchdog {hardware}. The consumer house
software periodically writes some knowledge to the watchdog driver,
relying upon the watchdog timeout interval. If for some cause the consumer
house software hangs, the watchdog machine doesn’t get serviced and
therefore triggers a system reset.

Often the appliance that writes to the watchdog driver is a
watchdog daemon which screens processes within the system, in addition to
different parameters similar to CPU utilization, reminiscence utilization, and so forth.

How Softdog Works[edit]

When the softdog driver is opened, softdog schedules a kernel timer to
expire after a specified timer margin. When some knowledge is written to
the driving force, the softdog driver re-schedules the timer. The consumer house
watchdog daemon periodically writes to the driving force, and the timer is
constantly rescheduled and therefore the timer callback is rarely
referred to as. If the watchdog daemon stops writing to the driving force, the timer
expires and the callback known as. Within the timer callback, the system
is restarted. This is a hyperlink to an article on methods to make use of a watchdog timer successfully.

Supply information[edit]

Within the 2.6 kernel the softdog driver is positioned in
drivers/char/watchdog/softdog.c. This is a hyperlink to the softdog driver on LXR


static int __init watchdog_init(void)
        int ret; 

        /* Verify that the soft_margin worth is inside it is vary ; 
           if not reset to the default */
        if (softdog_set_heartbeat(soft_margin)) {
                printk(KERN_INFO PFX "soft_margin worth should
                     be 0 

Additional studying[edit]

Leave a Reply

Your email address will not be published. Required fields are marked *