Module 4 Flashcards
Red Hat
4 Linux Process States
1) Running (R)
2) Sleeping (S, D, K, & I)
3) Stopped (T, T)
4) Zombie (Z, x)
Linux Process - Running State (R)
R - TASK_RUNNING: The process is either executing on a CPU or waiting to run. The process can be executing user routines or kernel routines (system calls), or be queued & ready when in the “Running” (or Runnable) state.
Linux Process - Sleeping State (S)
TASK_INTERRUPTIBLE: The process is waiting for some condition: a hardware request, system resource access, or a signal. When an event or signals satisfies the condition, the process returns to Running.
Linux Process - Sleeping State (D)
TASK_INTERRUPTIBLE: This process is also sleeping, but unlike the “s” state, does not respond to signals. It is used only wen process interruption might cause an unpredictable device state.
Linux Process - Sleeping State (K)
TASK_KILLABLE: Same as the interruptible “D” state, but modified to allow a waiting task to respond to the signal to kill it (exit completely). Utilities often display “Killable” processes as the “D” state.
Linux Process - Sleeping State (I)
TASK_REPORT_IDLE: A subset of state “D”. The kernel does not count these processes when calculating the load average. It is used for kernel threads. The TASK_INTERRUPTIBLE & TASK_NOLOAD flags are set.
It is similar to TASK_KILLABLE, & is also a subset of state “D”. It accepts fatal signals.
Linux Process - Stopped State (T1)
TASK_STOPPED: The process is stopped (suspended), usually by being signaled by a user or another process. The process can be continued (resumed) by another signal to return to running.
Linux Process - Stopped State (T2)
TASK_TRACED: A process that is being debugged is also temporarily stopped & shares the “T” state flag
Linux Process - Zombie State (Z)
EXIT_ZOMBIE: A child process signals to its parents as it exits. All resources except for the process identity (PID) are released.
Linux Process - Zombie State (x)
EXIT_DEAD: When the parents cleans up (reaps) the remaining child process structure, the process is not released completely. This state cannot be observed in process-listing utilities.
What are the Fundamental Process Management Signals?
1) 1
2) 2
3) 3
4) 9
5) 15 (default)
6) 18
7) 19
8) 20
Signal 1
HUP
Hangup: Reports termination of the controlling process of a terminal. Also requests process re-initialization (configuration reload) w/o termination.
Signal 2
INT
Keyboard interrupt: Causes program termination. It can be blocked or handled. Sent by pressing the INTR (interrupt) key sequence (Ctrl+c)
Signal 3
QUIT
Keyboard quit: Similar to SIGINT; adds a process dump at termination. Send by pressing the QUIT key sequence (Ctrl+)
Signal 9
KILL
Kill, unblockable: Causes abrupt program termination. It cannot be blocked, ignored, or handled; consistently fatal.