|
|
|
|
|
by CyberDildonics
1621 days ago
|
|
_I_ want to know what we're talking about lock free memory based interprocess communication (copied from my first reply) There is no need to back this memory with files Again, I'm interested in how you have two processes read and write lock free directly to the same memory if you don't use a memory mapped file. You have said it isn't necessary, I'm just asking you to back up this claim and explain exactly what you mean. |
|
Also, you can use normal (non-file-backed) memory to do the necessary synchronization (lock-free or not). I'm still not seeing why the memory should be backed by a file, that's why I was genuinely asking. One reason why it could be practical that I can now see could be for an embedded database like sqlite, but again I'm not sure it would be a good idea. While it would allow for pretty much setup-less synchronization of otherwise uncoordinated processes, it's a fringe application that might be better implemented with one big flock(). And one reason why it could be not a good idea is that it might couple the file format to a particular CPU architecture.
Another big issue I guess is that the atomics actually do have an effect to the underlying file whenever the pages are flushed. What if the computer shuts down unexpectedly? The synchronization affairs aren't cleaned up, yet the original processes are gone.