Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: ji@walkuere.altair.fr (Ji Ioannidis) Newsgroups: comp.sys.sun Subject: (1) locking pages in memory Keywords: SunOS Message-ID: <3982@kalliope.rice.edu> Date: 19 Jun 89 17:39:14 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 32 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 42, message 7 of 11 Is there any (kludgey) way in SunOS 4.0.1 to lock pages in core? The shmctl system call has an undocumented (in the manual) and unimplemented option SHM_LOCK that would lock a shared segment in memory. Does anyone know *when* this is going to be implemented (Sun, are you listening?) Can anything be done by poking kmem at some key points? A problem here is that pages (swap and real) for a shared memory segment are not really allocated until someone touches them. Another approach might be to have a background process that attaches to the shared memory, and to all new segments as they are created, reads them once to bring them incore, but somehow instruct the pager never to page out that process' pages. My application doesn't really need to add more memory as time passes; it needs an initial chunk of storage that *has* to be real memory. I guess that if I get desperate enough, I could write a pseudo-device driver that kmem_allocs a chunk of memory the first time it gets opened, then has an xxmmap() call that maps that storage to user space. Has anyone done any of the above? Any help would be appreciated. adTHANKSvance /ji #include In-Real-Life: John Ioannidis E-Mail-To: (preferred), or P-Mail-To: GIP-Altair, Dom de Voluceau BP105, Rocquencourt 78153 Le Chesnay, FR V-Mail-To: +33 1 39635227, +33 1 39635417 ... It's all greek to me