From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078721911717.tru64-unix-managers.marc@archive.invalid> From: Lars Bro Date: Tue, 01 Sep 1998 13:17:06 +0000 To: tru64-unix-managers Subject: Memory mapping and msync() X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078721911717 Hi, This question is about how memory works on DU. If I open a file and do I/O, pages of data will be located in the UBC. Anyone else opening that same file and doing I/O will naturally see the exactly same pages in the UBC and see the same changes as I see. If another user then memory maps this file, will these same pages be part of his adress space ? Below is what I have seen in man msync(2) After a successful call to the msync() function with the flags parameter set to MS_SYNC, all previous modifications to the mapped region are visible to processes using the read() function. Previous modifications to the file using the write() function might be lost. After a successful call to the msync() function with the flags parameter set to MS_INVALIDATE, all previous modifications to the file using the write() function are visible to the mapped region. Previous direct modifi- cations to the mapped region might be lost. This sounds to me as if DU implements two different ways to access data or that the SAME DATA is put TWO PLACES. I believed that "unified" of UBC ment that file system I/O were equal to mapped I/O and I also believed that the mach kernel was only memory mapped and even read()/write() I/O was eventually memory mapped as going through the mach kernel. Well ? -- Lars Bro lbr@dksin.dk ABB Daimler-Benz Transportation Signal A/S +45 36 39 01 77