Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!mit-eddie!uw-beaver!tektronix!sequent!rbk From: rbk@sequent.UUCP (Bob Beck) Newsgroups: comp.unix.wizards Subject: mmap() implementation Message-ID: <2711@sequent.UUCP> Date: Wed, 24-Jun-87 12:14:56 EDT Article-I.D.: sequent.2711 Posted: Wed Jun 24 12:14:56 1987 Date-Received: Fri, 26-Jun-87 07:21:57 EDT Organization: Sequent Computer Systems, Beaverton, OR Lines: 22 Keywords: mapped files, shared memory Sequent's version of UNIX (Dynix) implements a version of mmap(), with some of the "blanks" form the original 4.2bsd system description filled in. This supports paged shared memory (nice for parallel programming ;-), and can support SystemV shared-memory via library code (libc). If more than one process maps overlapping portions of a file for PROT_RDWR and MAP_SHARED you get shared memory. MAP_PRIVATE ==> local mods to the data. No address-space alignment restrictions other than page boundaries. Mapped files are "coherent" with normal reads and writes, so "cp mapped-file somewhere" will get the latest data. Mapped address space is dumped into core files, providing a "snapshot" of the data when/if the program dies. In the upcomming release of Dynix (v3.0) "shared text" is finally gone and is done as a sub-case of mapped files. Also mmap() can map over any previously existing address space (or it can populate new address space) -- the last thing mapped is what's there. munmap() makes address space go away (ie, creates a "hole"). mmap() also supports device-drivers providing physical or paged maps for various "custom" reasons. If anyone wants more details, let me know. Bob Beck Sequent Computer Systems