Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ shmcntl(1M) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ulimit(1)

quickdd(1M)

swap(1M)

execv(2)

shmop(2)

shmcntl(1M)                                                     shmcntl(1M)

NAME
     shmcntl - control shared memory policy and activate shared memory
     alignment

SYNOPSIS
     shmcntl [-a {-l|-g}] command

DESCRIPTION
     The shmcntl command controls how shared memory is allocated and
     aligned to 64-Mbyte memory addresses and then executes the command
     command for the specified allocation conditions in the required align-
     ment mode. On an RM600-E, a board can request memory be allocated glo-
     bally (round robin, distributed equally among boards) or locally. If
     shmcntl is called without options or explicitly with the -a option,
     the shared memory is aligned to a 64-Mbyte address.

   Alignment
     Alignment here means that both the start address and the length of the
     shared memory area can be divided evenly by 64 Mb.

     Aligning the shared memory is very important for reducing memory usage
     in the operating system, as page translation tables for all processes
     that use the shared memory area must only be created once for the
     shared memory required. The address translation tables can only be
     created in a physical memory area of between 0 and 512 Mbytes in the
     case of operating system versions prior to V5.44; when this limit is
     reached, further increases in system performance cannot be expected.

     Without alignment, the memory used for these tables is proportional to
     the product of the shared memory size and the number of user
     processes. In large configurations, this can easily run to hundreds of
     Mbytes. This type of critical utilization of the lower memory area is
     effectively avoided by aligning the shared memory areas.

     Alignment can be done in two ways:

     1) Explicitly by parameterizing shmat calls within applications [see
        shmat(2) in shmop(2)]. This procedure must be used directly when
        creating a shared memory application.

     2) Automatically by calling applications under the control of shmcntl.
        The advantage of this procedure is subsequent applicability without
        needing to intervene in existing applications.

     Two aspects must however be noted:

     a) The shmat(2) system call does produce automatic alignment, but does
        not comply with the X/OPEN standard.

     b) The virtual address space is increased in affected processes with
        the following characteristics:




Page 1                       Reliant UNIX 5.44                Printed 11/98

shmcntl(1M)                                                     shmcntl(1M)

        -  The virtual memory address is aligned automatically to 64 Mb if
           an address is preset to zero or to an address divisible by 64 Mb
           when the shared memory area is being allocated. The alignment
           mode is passed on within the process group of the specified
           command command via fork(2) and exec(2).

        -  The size of the shared memory area is extended simultaneously to
           the next highest multiple of 64 Mb. This can result in a consid-
           erable increase in the virtual process size. An increase in the
           "ulimits" may therefore be necessary for affected processes. The
           swap area may also need to be increased across the whole system.

        -  If there are a number of neighboring shared memory areas, align-
           ment of the start addresses is shifted to the next memory areas.

        -  All accesses are legal within shared memory areas, even accesses
           on memory areas that are allocated implicitly. For that reason,
           no application address errors are returned.

OPTIONS
     No option specified:
          Shared memory is aligned as described above.

     -a   Same as if no option is specified.

     -l   (RM600-E only) The shared memory is requested locally by a board
          on which the command command is running.

     -g   (RM600-E only) The shared memory is distributed equally (round
          robin) across all boards.

EXAMPLES
     shmcntl quickdd if=file of=/dev/ios0/rstape004

     In this example, the specified quickdd command is executed under the
     activated control of the 64 Mbyte alignment. An address translation
     table is only created once for the shared memory areas created in the
     quickdd command, although quickdd creates a number of internal
     processes (read and write processes).

     The command is only executed in this mode if the virtual address space
     was previously set > 128 Mb using ulimit -v.

SEE ALSO
     ulimit(1), quickdd(1M), swap(1M), execv(2), shmop(2).









Page 2                       Reliant UNIX 5.44                Printed 11/98

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