With
MAP_SHARED, updates are visible to other operating-system processes mapping the same region and are carried through to the backing file. With MAP_PRIVATE, updates instead stay private, and later backing file changes have unspecified visibility in that mapping.[ref]In the toy model, both shared file mappings initially read backing bytes x=7,y=8 at file offsets 8229 and 8230. Both memory pages have been accessed, so their translations are installed. A shared store changes the common page cache contents and creates a dirty memory page eligible for page writeback. That change can be observed before it reaches persistent storage. Cooperating readers need synchronization to know when an update is ready;
MAP_SHARED alone supplies no mutual exclusion or indivisible multi-field update. Articles by others on the same topic (0)
There are currently no matching articles.