Difference between revisions of "Process"

From VSI OpenVMS Wiki
Jump to: navigation, search
m
 
(One intermediate revision by the same user not shown)
Line 76: Line 76:
  
 
=See also=
 
=See also=
* [https://www.vmssoftware.com/pdfs/HP_branded_docs_1st_batch/OpenVMS_Performance_Management_manual.pdf OpenVMS Performance Management Manual]
+
* [https://vmssoftware.com/docs/OpenVMS_Performance_Management_manual.pdf OpenVMS Performance Management Manual]

Latest revision as of 09:35, 17 February 2022

A process is a context in which images run in OpenVMS. For example, when a user logs into an OpenVMS system, an interactive process is created for this user. If that user runs a batch job, a batch process is created. If that user spawns a subprocess, a subprocess is created. Services like SWAPPER, CLUSTER_SERVER, SHADOW_SERVER, JOB_CONTROL and others that perform system tasks also run as processes. Processes are characterized by their names and process identification codes; they are assigned a certain priority, run in a certain mode and are in a certain state at any given moment in time. Processes running on the system at the moment can be viewed with SHOW SYSTEM:

OpenVMS V8.4-2L1  on node STUDNT   18-NOV-2019 08:56:17.03   Uptime  16 08:06:40
  Pid    Process Name    State  Pri      I/O       CPU       Page flts  Pages
28E00401 SWAPPER         HIB     16        0   0 00:00:01.03         0      4
28E00407 CLUSTER_SERVER  HIB     12       34   0 00:00:00.07       159    194
28E00408 SHADOW_SERVER   HIB      6 14930051   0 00:02:34.96       150    189
28E00409 CONFIGURE       HIB     10       15   0 00:00:00.01       118    123
28E0040A USB$UCM_SERVER  HIB      6      497   0 00:00:00.08       303    444
28E0040B LANACP          HIB     14      105   0 00:00:00.01       201    253
28E0040D FASTPATH_SERVER HIB     10        8   0 00:00:00.01       140    167
28E0040E IPCACP          HIB     10        8   0 00:00:00.00       110    139
28E0040F ERRFMT          HIB      8    83189   0 00:00:00.90       194    234
28E00410 CACHE_SERVER    HIB     16       70   0 00:00:00.00        99    123
28E00411 OPCOM           HIB      8      806   0 00:00:00.07       971    133
28E00412 AUDIT_SERVER    HIB      8      116   0 00:00:00.01       201    247
28E00413 JOB_CONTROL     HIB     10      243   0 00:00:00.01       149    210
28E00419 SECURITY_SERVER HIB     10       49   0 00:00:00.03       457    585
28E0041A ACME_SERVER     HIB     10      134   0 00:00:00.02       433    551 M
28E0041C SMISERVER       HIB      9      109   0 00:00:00.01       303    343
28E0041D QUEUE_MANAGER   HIB     10      255   0 00:00:00.11       249    321
28E00422 SMHANDLER       HIB      8       52   0 00:00:00.01       272    277
28E00429 TCPIP$INETACP   HIB      9      510   0 00:00:00.05       489    466
28E0042A TCPIP$BOOTP_1   LEF     10     1555   0 00:00:00.12       587    484  N
28E0042B TCPIP$FAILSAF_1 HIB      9  3716274   0 00:00:00.03       603    503  N
28E0042C TCPIP$FTP_1     LEF     10      233   0 00:00:00.04       923    611  N
28E0044C JDOE            CUR   1  7     3380   0 00:00:00.46     10302    293
 

Process Mode

A process in OpenVMS can run in one of the following modes:

  • Interactive is a process that receives commands interactively from a terminal. It is created by JOB_CONTROL when a user logs in to the system and terminated whenever the user logs out.
  • Batch is a process that receives commands from a command procedure. It is created by JOB_CONTROL based on a batch job that a user has submitted whenever the user determines it should be run and a batch queue is available to run it. It terminates when it reaches the end of the command procedure file.
  • Subprocess is a process created by an interactive or batch process using the SPAWN or PIPE command. It shares resources with the parent process and terminates when the user logs out of that process or the command submitted to PIPE is done.
  • Network is a process created by network services such as FTP.
  • Detached is a process running an image and created by the RUN command. It is terminated whenever the image exits.

Process Priority

Process priority is a number from 0 to 31 assigned to each process that the system uses to determine which process should run next. Interactive processes receive their base priority from the SYSUAF record - it is either copied from the default account (4) or assigned with the /PRIORITY qualifier when the account it created in the AUTHORIZE utility. Their priority can be changed with the $SETPRI system service or the SET PROCESS/PRIVILEGE command (ALTPRI required to increase the priority of your own process, GROUP or WORLD to affect the priorities of other processes). Subprocesses and detached processes receive their base priority from the $CREPRC system service or the RUN command. If none is specified, the priority of the creator is used. Batch processes receive their priority from the following, in order of preference:

For either command, increases are permitted only for holders of the OPER privilege.

Process State

Main article: Process State A process can be in one of a few states depending on whether it is running and if not, why not:

  • COM (computable): the process is ready to run
  • CUR (current): the process is running
  • HIB (hibernating): the process is waiting for a specific time or request from another process; this is what most of the processes like JOB_CONTOL are doing most of the time
  • SUSP (suspended): the process has been suspended with the SET PROCESS/SUSPEND command; it can only be explicitly resumed by another process
  • LEF (waiting for Local Event Flag): the process is waiting for some event to occur before it can proceed (usually the completion of an I/O operation or keyboard input, etc)
  • CEF (waiting for Common Event Flag): like LEF, but there are a few processes waiting for the same event to occur
  • PFW (page fault wait): the process has made a reference to some part of its address space that is not currently in physical memory, causing a pade fault, and is waiting for the memory management code to get that page
  • RWxxx (resource wait):
  • MWAIT (miscellaneous wait)
  • COLPG (collided page wait): the process has referenced a shared memory page for which another process was already in PFW state.
  • states ending in -O (outswapped; HIBO, LEFO, etc.): the process has been swapped out of memory

The process state can be seen in the output of the SHOW SYSTEM command or obtained with the F$GETJPI lexical function or the relevant system service.

See also