Components of a Process:

1. Process Identifier – PID
2. Parent Process ID – PPID
3. UID and EUID – User Identification Number UID and End User ID
4. GID and EGID – Group Identification number and End User Group Identification number

Life Cycle of a Process

To create a new process a process copies itself with a fork system call. Fork creates a copy of the original. the fork process has a distinct PID the parent is the Original PID – also that is the PPID.

Process Signal

There are 4 kinds signals.

1. inter process communication signals
2. as terminal driver signals to kill, interrupt, or suspend processes when special keys such as
a. <Control C>
b. <Control Z>
3. Signals that can be sent by the administrator (with KILL) to achieve various results.
4. Kernel can send when a process commits an infraction such as division by Zero (0).

we need to know about the below signals:

From Unix System Administration Hand Book – 3rd Edition – By Evi Nemeth et all
sl.no Name Description Default Can Catch? Can Block? Dump Core?
1 HUP hangup Terminate Yes Yes No
2 INT Interrupt Terminate Yes Yes No
3 QUIT quit terminate Yes Yes Yes
9 KILL kill Terminate No No No
BUS Bus Error Terminate Yes Yes Yes
SEGV Segmeant Fault Terminate Yes Yes Yes
15 TERM Terminate Terminate Yes Yes No
STOP stop stop No No No
TSTP keyboard stop stop Yes Yes No
CONT Continue After stop Ignore Yes No No
WINCH window changed Ignore Yes Yes No
USR1 Used-defined Terminate Yes Yes No
USR2 User Defined Terminate Yes Yes No

Process States

  1. Runnable
  2. Sleeping
  3. Zombie
  4. Stopped

Resource Requiring Process Waits

  1. No Wait
  2. Willing to Wait

Nice and Renice – Influence Scheduling Priority. We need this to reduce “Log Sync Waits”

To monitor the processes ‘ps’ . Another monitoring processes command is top.

Runaway Processes

There are 2 types of Runaway Processes. A resource hog is one type of user process that is runaway resource hog. another one is a system process that suddenly go berserk and exhibit wild behavior.