*BSD News Article 14209


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: Powerfail / UPS implementation
Message-ID: <1993Apr9.162912.8165@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: Weber State University  (Ogden, UT)
References: <2107@hcshh.hcs.de> <jmonroyC57AsD.B00@netcom.com>
Date: Fri, 9 Apr 93 16:29:12 GMT
Lines: 57

In article <jmonroyC57AsD.B00@netcom.com> jmonroy@netcom.com (Jesus Monroy Jr) writes:
>mail hm@hcshh.hcs.de
>Re: Subject: Powerfail / UPS implementation
> 
>>> One of the machines nearby has a uninterruptable power supply built in and
>>> i would like to have it activated.
>>>
>>> So what is the best (most generic) way of implementing it into 386BSD ?
>>>
>>> What i have in mind is:
>>>
>>>     - a device driver capable of reporting the status of the power
>>>         supply (running from AC / running from DC). Should the
>>>         query be implemented as a read() returning a char or
>>>         as a ioctl() ?
[ ... ]
>>> The only hardware dependent part would be the device driver, but since the
>>> output is binary (power good/bad) the driver should be simple to adapt to
>>> common ups-monitoring devices.
>>>
>        Hide the hardware set if you know how.  If not write me.

Along the same lines, I would think that a "safe to halt, partial restart"
idle state would also be useful for a state-save feature on notebook
computers that allow definition of an interrupt handler for the shutdown
on idle that many of them support.

A slightly more generaly interface for powerfail/recovery (basically full
restoration of process state on recovery) should be possible, although the
file system state seems a bit tricky for the VM system to handle without
enough swap for all swapped images plus an image of main memory (my old
complaint of system dump images).

Failure recovery could result in restoration of not only system integrity,
but of process state as well.  This would solve the laptop problem in the
expected way (when the disk is spun back up, everything keeps running like
it was before the power conservation mode kicked in) as well as providing
better-than-simple-reboot support for powerfail recovery.

Something to add to a wish list, if nothing else.

Whatever you end up doing by way of abstracting the powerfail notification
interface from the actual hardware mechanism used by the UPS should at
least not disallow this in the future.


					Terry Lambert
					terry@icarus.weber.edu
					terry_lambert@novell.com
---
Any opinions in this posting are my own and not those of my present
or previous employers.
-- 
-------------------------------------------------------------------------------
                                        "I have an 8 user poetic license" - me
 Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
-------------------------------------------------------------------------------