Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vlock(2) — GENIX 4.1A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vspy(2)

nice(2)



      VLOCK(2)                GENIX Programmer's Manual                VLOCK(2)



      NAME
           vlock - lock process pages into memory

      SYNOPSIS
           vlock(function, address)
           char *address;

      DESCRIPTION
           Vlock is used to lock or unlock a page (1024 bytes) of a process  in
           memory.   Locked  pages cannot be swapped or moved around in memory,
           even if the process is not runnable.  This capability is useful when
           talking  to peripherals which need to do DMA into memory, or if very
           fast response times are required.  Function is 0 to unlock  a  page,
           or  1  to  lock  a  page.   Address is the address of the page to be
           locked or unlocked.  If  the  page  is  successfully  locked,  vlock
           returns the physical address of the page in memory.

           Pages of a process which are not locked are swappable.  If the  pro-
           cess does a fork(2), the parent's locked pages will still be locked.
           Shared text pages will also be locked for the child  process.   How-
           ever,  pages  in  the data or stack segment of the child will not be
           locked.  An exec(2) or exit(2) unlocks all the pages of the process.
           The  vlock call is restricted to the super-user.  It is never neces-
           sary to lock pages that have been mapped using vspy(2).

      SEE ALSO
           vspy(2), nice(2)

      DIAGNOSTICS
           -1 is returned if any argument is invalid, or if  the  user  is  not
           privileged.

      BUGS
           The system does not check to see how many pages  are  locked.   Thus
           the system can crash if not enough swappable pages remain.




















      Printed 9/28/83                                                         1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026