memory management -- mmap()

Brandon Allbery allbery at ncoast.UUCP
Sat Mar 8 10:16:46 AEST 1986


Expires:

Quoted from <4479 at think.ARPA> ["shared memory: a poll"], by rose at think.ARPA (John Rose)...
+---------------
| The "4.2BSD System Manual", in the section on memory management
| (/usr/doc/sysman/1.2.t), sketches out a future extension to Unix*
| called "mmap()".  This feature allows an "object" represented by
| a file-descriptor to be mapped into the per-process address space;
| there is provision for modifications made to the "object" to be
| shared by more than one process.
| 
| I haven't seen much discussion of this kind of memory management
| on the net, but I have heard of vendors implementing it.  So
| there must be people out there who have used it in interesting ways.
+---------------

Xenix 3.0 (I don't know about 5.0) does something that sounds like this.
There is a special type of file which is a shared-memory file.  A process
opens the file with a special system call (the file must exist or be created),
then any process which opens the file gets it attached to its memory space.
The problems:  (1) Xenix runs very slowly when a shared memory is open for
writing by more than one process (so say the docs); (2) they say NEVER leave
the shared memory attached while making a system call, as it can crash
Xenix(!).  There are system calls (aside from create/open and close of the
shared-memory file) which attach and detach the shared memory from the
process's address space.

Anyone with more Xenix and/or 4.2/4.3 experience know anything to prove or
disprove this?

--Brandon
(P.S.  The shared-memory file is an S_IFNAM; there is a special flag in the
inode which distinguishes between FIFOs and shared-memory files.  That may
give some idea what Xenix is up to.)
-- 
In mid-winter, all of us Midwesterners would *love* a taste of California...
	(r-r-r-rumbleSHA-A-KE!!!)		      ...but not *that* badly!

decvax!cwruecmp!ncoast!allbery  ncoast!allbery at Case.CSNET  ncoast!tdi2!brandon
(ncoast!tdi2!root for business) 6615 Center St. #A1-105, Mentor, OH 44060-4101
Phone: +01 216 974 9210      CIS 74106,1032      MCI MAIL BALLBERY (part-time)
      >>> Nominate Mark Leeper for a Hugo as Best Fan Writer of '85 <<<
(I disagree with many of his reviews, but that's just me.  He's better than 
 most of what I see.  Let's show the world what the NET is!)



More information about the Comp.unix.wizards mailing list