(1) locking pages in memory

Ji Ioannidis ji at walkuere.altair.fr
Tue Jun 20 03:39:14 AEST 1989


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 <appropriate disclaimers>

In-Real-Life: John Ioannidis
E-Mail-To: <ji at cs.columbia.edu> (preferred), or <ji at walkuere.altair.fr>
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



More information about the Comp.sys.sun mailing list