Application
programs access shared memory by mapping Galaxy-wide shared sections.
The programming model is the same as for standard OpenVMS global
sections; that is, you create, map, unmap, and delete them on each
instance where you want to use them. Some shared memory global section
characteristics are:
Pages start out as demand zero with
preallocated shared PFNs.
Pages are not counted against your working set.
Once the page is valid in your process' page table,
it stays valid until it is deleted; shared memory section pages
are never paged to disk.
You must create the shared section on each instance
where you want to access shared memory.
Sections can be temporary or permanent.
Sections can be group or system global sections.
Galaxy-wide shared sections use a different name
space than traditional global sections.
Section versions specified in the ident_64 field
are validated throughout the Galaxy.
Only one shared section with a given name and UIC
group can exist in a sharing community. This is different from traditional
global sections, in which multiple versions can coexist.
The SHMEM privilege is required to create a shared
memory section.
From a programmer's point of view, shared memory global sections
are similar to memory resident sections. You use the same system
services to create Galaxy-wide shared sections that you would use
to create memory resident sections. Setting the flag SEC$M_SHMGS
lets the service operate on a shared memory global section.
In contrast to memory resident sections, the Reserved Memory
Registry is not used to allocate space for Galaxy-wide sections.
The SYSMAN RESERVE commands affect only node-private memory. Shared
memory is not used for normal OpenVMS paging operations and does
not need to be reserved.
There is also no user interface to specify whether shared
page tables should be created for Galaxy-wide sections. Instead,
the creation of shared page tables for Galaxy-wide sections is tied
to the section size. As of OpenVMS Version 7.2, shared page tables
are created for sections of 128 pages (1 MB) or more. Galaxy-wide shared
page tables are shared between all Galaxy instances.