C
Hi all
This is kinda out of the clear blue, but I thought I'd bounce it off ya and see what you think.
I was playing with some code for the old demo and got to thinking about how to preserve state across a boot or, heaven forbid, a crash. This provoked much discussion the first time around with schemes flying by and half a dozen threads. Since I was doing an external memory map mmap()ed into user space, it occurred to me that a very *nix way was staring me right in the face.
The data to be preserved would be written to or kept on a disk file mmap()ed into user space. With the right parameters this will flow to disk quickly through the existing kernel facilities.
I believe we can even block until the data is safely written, at least to the hdd cache. On restart the file is mmap()ed again and the data is just there. Simple and automatic. No fuss, no
bother.
OK Now go ahead and shoot holes in it.........
regards
cww
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc
This is kinda out of the clear blue, but I thought I'd bounce it off ya and see what you think.
I was playing with some code for the old demo and got to thinking about how to preserve state across a boot or, heaven forbid, a crash. This provoked much discussion the first time around with schemes flying by and half a dozen threads. Since I was doing an external memory map mmap()ed into user space, it occurred to me that a very *nix way was staring me right in the face.
The data to be preserved would be written to or kept on a disk file mmap()ed into user space. With the right parameters this will flow to disk quickly through the existing kernel facilities.
I believe we can even block until the data is safely written, at least to the hdd cache. On restart the file is mmap()ed again and the data is just there. Simple and automatic. No fuss, no
bother.
OK Now go ahead and shoot holes in it.........
regards
cww
_______________________________________________
LinuxPLC mailing list
[email protected]
http://linuxplc.org/mailman/listinfo/linuxplc