*BSD News Article 26518


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!decwrl!decwrl!hal.com!olivea!sgigate.sgi.com!sgiblab!sdd.hp.com!vixen.cso.uiuc.edu!howland.reston.ans.net!europa.eng.gtefsd.com!news.umbc.edu!haven.umd.edu!umd5.umd.edu!mark
From: mark@roissy.umd.edu (Mark Sienkiewicz)
Newsgroups: comp.os.386bsd.misc
Subject: Re: NetBSD on cheap boxes
Date: 26 Jan 1994 15:11:20 GMT
Organization: Zeno, IPST, University of Maryland
Lines: 34
Message-ID: <2i616o$ds0@hecate.umd.edu>
References: <2h2u3kINN6o3@ymir.cs.umass.edu> <CJpoL6.BIx@veda.is> <PF51-V$@b-tech.uucp> <2i17cu$n6m@pdq.coe.montana.edu>
NNTP-Posting-Host: roissy.umd.edu

In article <2i17cu$n6m@pdq.coe.montana.edu>,
Nate Williams <nate@bsd.coe.montana.edu> wrote:
>In article <PF51-V$@b-tech.uucp>, Jon Zeeff <jon@b-tech.ann-arbor.mi.us> wrote:
>>  Having seen a couple of systems go into this pingable, but
>>otherwise dead state, I'd like to see the kernel do some testing on the 
>>proper functioning of the system and reboot if it is not correct.
>
>Easier said than done.  Things like this are best done in hardware rather than
>software, since

Obviously, a watchdog would be better implemented in hardware, but it
isn't.  It wouldn't be too hard to build, though...

I don't particularly feel a need for a watchdog timer, but if you wanted
one, you could try this:

- Simulate a timer by adding a counter to the existing clock interrupt.

- clear the counter any time you would try to run a user process.  Remember
to account for the case where you decide there is no runable process.

This catches most cases of the kernel hanging-- sort of by definition,
the system isn't hung if it is still executing user processes.  It
doesn't catch it if you break the clock interrupt or accidently leave
interrupts disabled somewhere.

Still, it's better than nothing if you 1) really want one, and 2) don't
want to build hardware.

>Telling a piece of software to check on itself w/out any hardware is like
>asking Congress to police itself. :-(

More like telling a sub-comittee to check up on the whole body... :)