Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
UNIX V6 struct proc in /usr/sys/proc.h
* One structure allocated per active
* process. It contains all data needed
* about the process while the
* process may be swapped out.
* Other per process data (user.h)
* is swapped with the process.
struct proc
char p_stat;
char p_flag;
char p_pri; /* priority, negative is high */
char p_sig; /* signal number sent to this process */
char p_uid; /* user id, used to direct tty signals */
char p_time; /* resident time for scheduling */
char p_cpu; /* cpu usage for scheduling */
char p_nice; /* nice for scheduling */
int p_ttyp; /* controlling tty */
int p_pid; /* unique process id */
int p_ppid; /* process id of parent */
int p_addr; /* address of swappable image */
int p_size; /* size of swappable image (*64 bytes) */
int p_wchan; /* event process is awaiting */
int *p_textp; /* pointer to text structure */
} proc[NPROC];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment