Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!att!dptg!lzaz!hutch From: hutch@lzaz.ATT.COM (Bob Hutchison) Newsgroups: comp.unix.wizards Subject: Re: shared memory Message-ID: <885@lzaz.ATT.COM> Date: 13 Dec 89 17:48:55 GMT References: <21223@mimsy.umd.edu> Organization: AT&T ISL Lincroft NJ USA Lines: 42 From article <21223@mimsy.umd.edu>, by chris@mimsy.umd.edu (Chris Torek): - In article <1989Dec12.005555.20618@virtech.uucp> cpcahil@virtech.uucp - (Conor P. Cahill) writes: ->Modifying the SHMMAX should only require a kernel re-configuration which ->should always be an option. - - As I understand it---which is not to say that it is so, for I have - never seen the SysRel% 1, 2, or 3# code itself---the total amount of - shared memory allowed per-system is reserved at boot time, is not - pageable, and is effectively taken away from the rest of the system. - For processes not using it, it is as if some of the machine's memory - had been physically removed. - - This would mitigate against raising SHMMAX arbitrarily.... - - (No doubt someone will follow up if my understanding is incorrect.) [ stuff deleted ] - In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) - Domain: chris@cs.umd.edu Path: uunet!mimsy!chris I've looked at this source code for at least SVR3.x and the shared memory creation routines allocate regions just as exec(2) allocates regions. Memory is not reserved at boot time; in fact it isn't even allocated when the shared memory segment is created - its pages are marked "demand zero" and are allocated as page faults indicate that the pages are being referenced. I guess this has changed in SVR4.0. BTW, the last time I looked, shared memory was not in the parts of the SVID where message queues and semaphores were. It was in a section called "optional stuff" or something like that. Since shared memory (and especially limits and config info) is closely tied to the memory management architecture for the machine, it can't be made portable too easily. And, to quote a famous computer scientist... 8v) - (No doubt someone will follow up if my understanding is incorrect.) Robert Hutchison att!lzaz!hutch