What happens when two processes write to same portion of a mmaped file?

Viewed 5099

I am writing a C program that makes use of mmap system call, running on Linux 3.12 64-bit.

If I have two processes mmaping the same region of a disk file with read/write access, and then modify the region content from both processes at the same time...

  • Can one process see (read) changed data made by the other process, before or after msync?
  • If update can be seen by the other process - is there a happens-before guarantee made by Linux mmap implementation?
1 Answers
Related