Posted by The_roibm on 10/04/63 11:10
ok, so the solution is shm or shmop, but there is something I'm not
sure about it...
the way I wanna go is shm and sem and the things that are clear are:
- use sem to block multiple processes(or threads) writing to the same shm block
- there is no need to use sem for reading since multiple
processes(threads) can read safely from the same shm block
what is not that clear is... what happens when a process reads and
another writes exactly at the same time? do the read operations behave
like some sort of transactions that ensure you get the content
available in the shm block at the beginning of the read even when it
is changed during the read? I guess this is not the case, so how would
you handle this properly?
regards
[Back to original message]
|