Keeping pages from getting swapped out.

Tim Dawson tim at Athena.UUCP
Sat Mar 17 05:04:05 AEST 1990


chandra at thiazi.cs.cornell.edu (Tushar D Chandra) writes:

>I'm writing an application in which I need to keep a small process (1-2 pages)
>from getting swapped out. ...                                      

AS per my references on SysVR3.5, the system call you are looking for is 
plock() thus:

#include <sys/lock.h>
int plock (op)
int op; 

Where op is:

PROCLOCK - lock test and data segments into memory (process lock)
TXTLOCK - leock text segments into memory (text lock)
DATLOCK - lock data segment into memory (data lock)
UNLOCK - remove locks.

This only works for superuser permissions

-- 
================================================================================
Tim Dawson (...!texsun!Athena!tim)  Motorola Computer Systems, Dallas, TX.
"The opinions expressed above do not relect those of my employer - often even I
cannot figure out what I am talking about."



More information about the Comp.unix.wizards mailing list