| zaphod 2004-01-23, 5:01 pm |
| Ok, my question is how exactly is shared memory supposed to behave as
specified by the POSIX standard. If I have two processes that both use
shm_open and mmap on the same memory:
1) If one process writes to the mapped portion of the file, how soon
are the changes affecting the second process ? Is a flushing operation
required for this ?
2) How efficient is it ? Is the changes to memory being written first
to file by the first process then read from file by second process
(inefficient) or is the RAM really being shared without necessarily
involving disk operations ? Or is it a combination of the two ...
3) How much more efficient is using shared memory over using
non-buffered IO ?
I would appreciate it if anyone could suppy some answers to these
questions,
Zaphod
|