[TUHS] SCCS, TeamWare, BitKeeper, and Git
Larry McVoy
lm at mcvoy.com
Mon Dec 16 06:57:51 AEST 2024
On Sun, Dec 15, 2024 at 03:48:40PM -0500, Douglas McIlroy wrote:
> Unix originally imitated the Multics file system, but not the universal
> memory. mmap(2) weakly imitates universal memory by allowing a process
> to nominally incorporate a portion of a file into the process address space
> at page-level granularity. However, an update is guaranteed to be visible
> to the file and other processes only upon specific request.
That's not true with Sun's mmap(). It's coherent across process boundaries
and it's in sync with read()/write(). This is because Sun got rid of the
buffer cache and _only_ did file IO to/from the page cache. You mapped
the actual page into your address space, if one process wrote it, the
other process will see it.
> Does anyone know whether there are implementations of mmap that
> do transparent file sharing? It seems to me that should be possible by
> making the buffer cache share pages with mmapping processes.
SunOS 4.0 did what I believe you are asking.
http://mcvoy.com/lm/papers/SunOS.vm_arch.pdf
http://mcvoy.com/lm/papers/SunOS.vm_impl.pdf
--
---
Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat
More information about the TUHS
mailing list