Document revision date: 19 July 1999
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]
OpenVMS Programming Concepts Manual

OpenVMS Programming Concepts Manual

Order Number: AA--PV67D--TK

January 1999

This manual describes the features that the OpenVMS operating system provides to programmers.

Revision/Update Information: This manual supersedes the OpenVMS Programming Concepts Manual, Version 7.1.

Software Version: OpenVMS Alpha Version 7.2
OpenVMS VAX Version 7.2

Compaq Computer Corporation
Houston, Texas

January 1999

Compaq Computer Corporation makes no representations that the use of its products in the manner described in this publication will not infringe on existing or future patent rights, nor do the descriptions contained in this publication imply the granting of licenses to make, use, or sell equipment or software in accordance with the description.

Possession, use, or copying of the software described in this publication is authorized only pursuant to a valid written license from Digital or an authorized sublicensor.

Compaq conducts its business in a manner that conserves the environment and protects the safety and health of its employees, customers, and the community.

© Compaq Computer Corporation 1999. All rights reserved.

The following are trademarks of Compaq Computer Corporation: ACMS, Alpha, AXP, Bookreader, Compaq, DBMS, DECdirect, DECdtm, DECthreads, DEC Fortran, DIGITAL, MicroVAX, OpenVMS, PDP-11, VAX, VAXcluster, VAX Ada, VAX BASIC, VAX BLISS-32, VAX DOCUMENT, VAX MACRO, VAX Pascal, VMS, VMScluster, VT100, and the Compaq logo.

The following are third-party trademarks:

Motif, OSF, OSF/1, OSF/Motif, and Open Software Foundation are registered trademarks of the Open Software Foundation, Inc.

All other trademarks and registered trademarks are the property of their respective holders.


The OpenVMS documentation set is available on CD-ROM.

This document was prepared using VAX DOCUMENT, Version V3.2n.

Contents Index


Intended Audience

This manual is intended for system and application programmers. It presumes that its readers have some familiarity with the OpenVMS programming environment, derived from the OpenVMS Programming Environment Manual and OpenVMS high-level language documentation.

Document Structure

This manual's chapters provide information about the programming features of the OpenVMS operating system. A list of the chapters and a summary of their content is as follows:

OpenVMS Alpha Support for 64-Bit Addresses

As of Version 7.0, the OpenVMS Alpha operating system provides support for 64-bit virtual memory addresses, which makes the 64-bit virtual address space defined by the Alpha architecture available to the OpenVMS Alpha operating system and to application programs. In the 64-bit virtual address space, both process-private and system virtual address space extend beyond 2 GB. By using 64-bit addressing features, programmers can create images that map and access data beyond the previous limits of 32-bit virtual addresses.

Many tools and languages supported by OpenVMS Alpha (including the Debugger, run-time library routines, and DEC C) are enhanced to support 64-bit virtual addressing. Input and output operations can be performed directly to and from the 64-bit addressable space by means of RMS services, the $QIO system service, and most of the device drivers supplied with OpenVMS Alpha systems.

Underlying this are new system services, which allow an application to allocate and manage the 64-bit virtual address space that is available for process private use.

Nonprivileged programs may optionally be modified to exploit 64-bit addressing support. OpenVMS Alpha 64-bit virtual addressing does not affect nonprivileged programs that are not explicitly modified to exploit 64-bit support. Binary and source compatibility of existing nonprivileged programs is guaranteed.

For more information about OpenVMS Alpha 64-bit virtual addressing features, see the OpenVMS Alpha Guide to 64-Bit Addressing and VLM Features.

Related Documents

For a detailed description of each run-time library and system service routine mentioned in this manual, see the OpenVMS Run-Time Library documentation and the OpenVMS System Services Reference Manual.

You can find additional information about calling OpenVMS system services and Run-Time Library routines in OpenVMS Programming Interfaces: Calling a System Routine and in your language processor documentation. You may also find the following documents useful:

For additional information on the Open Systems Software Group (OSSG) products and services, access the following OpenVMS World Wide Web address: 

Reader's Comments

Compaq welcomes your comments on this manual.

Print or edit the online form SYS$HELP:OPENVMSDOC_COMMENTS.TXT and send us your comments by:
Fax 603 881-0120, Attention: OSSG Documentation, ZK03-4/U08
Mail Compaq Computer Corporation
OSSG Documentation Group, ZKO3-4/U08
110 Spit Brook Rd.
Nashua, NH 03062-2698

How To Order Additional Documentation

Use the following World Wide Web address to order additional documentation: 

If you need help deciding which documentation best meets your needs, call 800-DIGITAL (800-344-4825).


The following conventions are used in this manual:
Ctrl/ x A sequence such as Ctrl/ x indicates that you must hold down the key labeled Ctrl while you press another key or a pointing device button.
PF1 x A sequence such as PF1 x indicates that you must first press and release the key labeled PF1 and then press and release another key or a pointing device button.
[Return] In examples, a key name enclosed in a box indicates that you press a key on the keyboard. (In text, a key name is not enclosed in a box.)

In the HTML version of this document, this convention appears as brackets, rather than a box.

... A horizontal ellipsis in examples indicates one of the following possibilities:
  • Additional optional arguments in a statement have been omitted.
  • The preceding item or items can be repeated one or more times.
  • Additional parameters, values, or other information can be entered.
A vertical ellipsis indicates the omission of items from a code example or command format; the items are omitted because they are not important to the topic being discussed.
( ) In command format descriptions, parentheses indicate that you must enclose the options in parentheses if you choose more than one.
[ ] In command format descriptions, brackets indicate optional elements. You can choose one, none, or all of the options. (Brackets are not optional, however, in the syntax of a directory name in an OpenVMS file specification or in the syntax of a substring specification in an assignment statement.)
[|] In command format descriptions, vertical bars separating items inside brackets indicate that you choose one, none, or more than one of the options.
{ } In command format descriptions, braces indicate required elements; you must choose one of the options listed.
bold text This text style represents the introduction of a new term or the name of an argument, an attribute, or a reason.
italic text Italic text indicates important information, complete titles of manuals, or variables. Variables include information that varies in system output (Internal error number), in command lines (/PRODUCER= name), and in command parameters in text (where dd represents the predefined code for the device type).
UPPERCASE TEXT Uppercase text indicates a command, the name of a routine, the name of a file, or the abbreviation for a system privilege.
Monospace text Monospace text indicates code examples and interactive screen displays.

In the C programming language, monospace type in text identifies the following elements: keywords, the names of independently compiled external functions and files, syntax summaries, and references to variables or identifiers introduced in an example.

- A hyphen at the end of a command format description, command line, or code line indicates that the command or statement continues on the following line.
numbers All numbers in text are assumed to be decimal unless otherwise noted. Nondecimal radixes---binary, octal, or hexadecimal---are explicitly indicated.

Chapter 1
Process Creation

This chapter describes process creation and the different types of processes. It also describes kernel threads and the kernel threads process structure. This chapter contains the following sections:

Section 1.1 defines a process and describes the two types of processes.

Section 1.2 describes the execution context of a process.

Section 1.3 describes the modes of execution of a process.

Section 1.4 describes the creation of a subprocess.

Section 1.5 describes the creation of a detached process.

Section 1.6 describes kernel threads and the parts that make up the kernel threads process.

1.1 Process Types

A process is the environment in which an image executes. Two types of processes can be created with the operating system: spawned subprocesses or detached processes.

A spawned subprocess is dependent on the process that created it (its parent), and receives a portion of its parent process's resource quotas. The system deletes the spawned subprocess when the parent process exits.

A detached process is independent of the process that created it. The process the system creates when you log in is, for example, a detached process. If you want a created process to continue after the parent exits, or not to share resources with the parent, use a detached process.

Table 1-1 compares the characteristics of subprocesses and detached processes.

Table 1-1 Characteristics of Subprocesses and Detached Processes
Characteristic Subprocess Detached Process
Privileges Received from creating process Specified by creating process
Quotas and limits Shared with creating process Specified by creating process, but not shared with creating process
User authorization file Used for information not given by creating process Used for most information not given by creating process
User identification code Received from creating process Specified by creating process
Restrictions Exist as long as creating process exists None
How created SYS$CREPRC, LIB$SPAWN or PPL$SPAWN from another process SYS$CREPRC from another process
When deleted At image exit, or when creating process exits At image exit
Command language interpreter (CLI) present Usually not if created with SYS$CREPRC; usually yes if spawned Usually not (though interactive user processes have CLI present, and they are created with SYS$CREPRC)

1.2 Execution Context of a Process

The execution context of a process defines a process to the system. It includes the following:

When the system creates a detached process as the result of a login, it uses the system user authorization file (SYSUAF.DAT) to determine the process's execution context.

For example, the following occurs when you log in to the system:

  1. The process created for you executes the image LOGINOUT.
  2. The terminal you are using is established as the input, output, and error stream device for images that the process executes.
  3. Your disk and directory defaults are taken from the user authorization file.
  4. The resource quotas and privileges you have been granted by the system manager are associated with the created process.
  5. A command language interpreter (CLI) is mapped into the created process.

1.3 Modes of Execution of a Process

A process executes in one of the following modes:

1.4 Creating a Subprocess

You can create a subprocess using the LIB$SPAWN and PPL$SPAWN run-time library routines or the SYS$CREPRC system service. A subprocess created with LIB$SPAWN or PPL$SPAWN is called a spawned subprocess.

Table 1-2 lists the context values provided by LIB$SPAWN, PPL$SPAWN, and SYS$CREPRC for a subprocess when using the default values in the routine calls.

Table 1-2 Comparison of LIB$SPAWN, PPL$SPAWN, and SYS$CREPRC Context Values
DCL Yes Yes No 1
Default device and directory Parent's Parent's Parent's
Symbols Parent's Parent's No
Logical names Parent's 2 Parent's 2 No 2
Privileges Parent's Parent's Parent's
Priority Parent's Parent's 0

1The created subprocess can include DCL by executing the system image SYS$SYSTEM:LOGINOUT.EXE.
2Plus group and job logical name tables.

Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement