This structure, which is permanently resident in main memory, contains fifteen elements, of which eight are characters, six are integers, and one a pointer to an integer. Each element represents information that must be accessible at any time, especially when the main part of the process image has been swapped out to disk:
“p_stat” may take one of seven values which define seven mutually exclusive states. See lines 0381 to 0387;
“p_flag” is an amalgam of six one bit flags which may be set independently. See lines 0391 to 0396;
“p_addr” is the address of the data segment:
If the data segment is in main memory this is a block number;
otherwise, if the data segment has been swapped out, this is a disk record number;
“p_size” is the size of the data segment, measured in blocks;
“p_pri” is the current process priority. This may be recalculated from time to time as a function of “p_nice”, “p_cpu” and “p_time”;
“p_pid”, “p_ppid” are numbers which uniquely identify a process and its parent;
“p_sig”, “p_uid”, “p_ttyp” are involved with external communication i.e. with messages or “signals” from outside the process’s normal domain;
“p_wchan” identifies, for a “sleeping” process (“p_stat” equals either “SSLEEP” or “SWAIT”), the reason for sleeping;
“p_textp” is either null or a pointer to an entry in the “text” array (4306), which contains vital statistics regarding the text segment.