Re: "Non-volatile" OS ?



Hi Jim ! Notes inline below...

Jim Granville wrote:
> drn@xxxxxxxxxx wrote:
> > The "state of all processes" includes the state of all RAM used by the
> > process plus any OS resources used by the process (things like file
> > handles, or the state of an OS call in progress at shutdown, all need
> > to remain valid)....
>
> File handles ? - you mean this has to survive a power fail during a
> file write - to what HDD/FlashDrive/USB Drive... ?

Sure. Assume there's an embedded flash file system, and another
file system plugged in on a USB key. For the first, the supercap
is sized to guarantee completion of an IO operation and leaving
the device in a sane state. For the second, it might fail, and
return an IO error to the app (just like if the user unplugs
the thing while its in use).

> First, you need a Board/BIOS that can start quickly, and the
> more complex that is, the less likely you are to control that.
> [Your mention of USB and File handles makes this sound a little
> scary...]
>
> Next, you need to define the data-sets of all processes,
> ie Sizes/Content/Integrity checks, and the risk/consequence of
> any errors.

Right, this is what I did in the OS I wrote. If there wasn't
a smooth shutdown (integrity check failed), it did a cold-start.
Of course that never happens (it really does not happen).

> If you have control on the HW, then you should look to use
> FRAM or MRAM (or BB SRAM), and map all those data-sets into
> the NV space.
>
> On startup, your SW needs to check validity of the datasets,
> and decide if a full-init is needed, or if a quick-go is OK.
> The OS cannot do this for you. It has no idea of the HW
> and real world changes that may, or mat not, affect your code.

The OS can ensure that a sane shutdown was performed, such that
it is safe to restart all processes, then perform any required
low-level HW reinit, then restart all processes and message them
that a restart happened.

> An alternative approach, is to use Microcontrollers for the
> Real-World IO stuff, and they CAN re-start very quickly indeed,
> then run safely whilst they wait for an update from the slower OS.
> There are plenty of uC now, with large resource sets :
> 64KB RAM/256K Flash and USB/Ethernet/CAN etc
> Maxim have an interesting MAX3420 SPI-USB device, that looks
> to be able to add 12Mbd USB to almost any small uC.
> SPI to the uC makes sense here; much faster than the RS232-USB devices,
> and fewer pins than the FIFO USB devices.
>
> -jg

The low-level stuff is easy; what I'm looking for is safe
save/restart of the larger high-level stuff (whose context is
large and thus obnoxious to serialize and restart from at the
app level).

Hope I'm explaining clearly...
Thanks for the thoughts !
Best Regards, Dave

.



Relevant Pages

  • Shutdown & Restart
    ... causing his shutdown problems and error conditions. ... reboots on shutdown if APM is enabled, ... USB Connections As can be seen from remarks in the Misc. ... XP will restart instead of shut down. ...
    (microsoft.public.windowsxp.general)
  • Re: SYSTEM CAN NOT INSTALL PRINTER
    ... Restart and let WinXP Load. ... software if USB and then reconnect ... If Parallel Connect shutdown connect the printer and ...
    (microsoft.public.windowsxp.hardware)
  • Re: pnpacpi : exceeded the max number of IO resources
    ... The pnpacpi rsparser.c report warnings of: ... Allocating PCI resources starting at 50000000 ... usbcore: ... system 00:01: ioport range 0x800-0x85f has been reserved ...
    (Linux-Kernel)
  • RE: mouse freezing in xp
    ... > Hi Sha. ... I have also had that problem, especially when using a USB mouse.. ... >> a manual shutdown and restart. ... >> It doesn't appear to be a CPU issue, as the Task Manager (which I can still ...
    (microsoft.public.windowsxp.general)
  • Re: Laptop with windows XP wont start up. Need help for fix/save.
    ... where do I find instructions for installing the hard drive in the 2.5" USB case? ... Laptop dive cases come with a three-headed cable as the power draw of a hard disk can be an amp, and a single USB port draws half that. ... It was a warning from Windows of a dangerous error that brought my PC ... problem, so I did restart. ...
    (microsoft.public.windowsxp.general)