I have a friend who wrote a piece of software that had to recover from
crashes in the middle of i/o.
He used a circular i/o buffer with a set of input and output pointers
that were atomically updated following a valid record write or read.
So no partial writes or read were possible, protecting the structure.
The most recent pointers were saved, in his case, I believe,
to be recovered after re-boot. There are probably many variations
on this involving different methods of record locking and pointer recovery.
In terms of recovering from a crash in mid-swap, the implemtation isn't obvious to me.
Regards,
Mike Cravens
Paul Koning wrote:
>>>>> "S" == S ANCELOT <[EMAIL PROTECTED]> writes:> OK, but I will need an IDE magnetic hard disk .
> To allow my system to work perfectly, do I have to partition as
> follow :> /var, /tmp : ram disk on which all temporary and log files should
> be redirected /usr linux system ... first partition read only
> mounted /home second partition rw> user data will be stored on hard disk /home partitions. After
> writing to this partition is there a way or configuration mode to
> be sure that all data will be synced on disk immediatly after a
> few ms and nothing remains in memory ?If you use some BIG capacitors you may get several seconds of running
time after a power failure. That's like a UPS but much simpler.There's a mechanism in Linux to do automatic shutdown if the UPS
indicates that the line power is gone. You might be able to tie into
that. (I don't know how it works but you might find it mentioned in
/etc/inittab or documentation about that file.)> I agree that if a shutdown happens while saving user data, they
> will be corrupted (any kind of system will have the same problem)Not true, actually. "Log based" file systems have the nice property
that they recover from crashes no matter when the crash occurred.
There's been some mention of a log based file system for Linux, don't
remember any details but that may be just the thing.paul
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/
-- Alcatel USA Internet: [EMAIL PROTECTED] 1000 Coit Road Plano, Texas 75075 **** The opinions expressed are not those of DSC Communications, Inc ****