Module 4 Flashcards

Red Hat

1
Q

4 Linux Process States

A

1) Running (R)
2) Sleeping (S, D, K, & I)
3) Stopped (T, T)
4) Zombie (Z, x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Linux Process - Running State (R)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Linux Process - Sleeping State (S)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Linux Process - Sleeping State (D)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Linux Process - Sleeping State (K)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Linux Process - Sleeping State (I)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Linux Process - Stopped State (T1)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Linux Process - Stopped State (T2)

A

TASK_TRACED: A process that is being debugged is also temporarily stopped & shares the “T” state flag

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Linux Process - Zombie State (Z)

A

EXIT_ZOMBIE: A child process signals to its parents as it exits. All resources except for the process identity (PID) are released.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Linux Process - Zombie State (x)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the Fundamental Process Management Signals?

A

1) 1
2) 2
3) 3
4) 9
5) 15 (default)
6) 18
7) 19
8) 20

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Signal 1

A

HUP

Hangup: Reports termination of the controlling process of a terminal. Also requests process re-initialization (configuration reload) w/o termination.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Signal 2

A

INT

Keyboard interrupt: Causes program termination. It can be blocked or handled. Sent by pressing the INTR (interrupt) key sequence (Ctrl+c)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Signal 3

A

QUIT

Keyboard quit: Similar to SIGINT; adds a process dump at termination. Send by pressing the QUIT key sequence (Ctrl+)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Signal 9

A

KILL

Kill, unblockable: Causes abrupt program termination. It cannot be blocked, ignored, or handled; consistently fatal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Signal 15 (default)

A

TERM

Terminate: Causes program termination. Unlike SIGKILL, it can be blocked, ignored, or handled. The “clean” way to ask a program to terminate; it allows the program to complete essential operations & self-cleanup before termination

17
Q

Signal 18

A

CONT

Continue: Sent to a process to resume if stopped. It cannot be blocked. Even if handled, it always resumes the process.

18
Q

Signal 19

A

STOP

Stop, unblockable: Suspends the process. It cannot be blocked or handled

19
Q

Signal 20

A

TSTP

Keyboard stop: Unlike SIGSTOP, it can be blocked, ignored, or handled. Sent by pressing the suspend key sequence (Ctrl+z)

20
Q

Keyboard Control sequence to Suspend

A

Ctrl+z

21
Q

Keyboard Control sequence to Kill

A

Ctrl+c

22
Q

Keyboard Control sequence to Core Dump

A

Ctrl+\

23
Q

Default action - Term

A

Terminate a program (exit) immediately

24
Q

Default action - Core

A

Save a program’s memory image (core dump), & then terminate

25
Q

Default action - Stop

A

Stop a running program (suspend) & wait to continue (resume)

26
Q

Fundamental Keystroke in “top” Command - “?” or “h”

A

Help for interactive keystrokes

27
Q

Fundamental Keystroke in “top” Command - “l, t, m”

A

Toggles for load, threads, & memory header lines

28
Q

Fundamental Keystroke in “top” Command - “I” (capital “eye”)

A

Toggle for individual CPUs or a summary for all CPUs in the header

29
Q

Fundamental Keystroke in “top” Command - “s”

A

Change the refresh (screen) rate, in decimal seconds (0.5, 1, 5)

30
Q

Fundamental Keystroke in “top” Command - “b”

A

Toggle reverse highlighting for “Running” processes; the default is bold only

31
Q

Fundamental Keystroke in “top” Command - Shift+b

A

Enables bold use in display, in the header, & for “Running” processes

32
Q

Fundamental Keystroke in “top” Command - Shift+h

A

Toggle threads; show process summmary or individual threads

33
Q

Fundamental Keystroke in “top” Command - “u”, Shift+u

A

Filter for any username (effective, real)

34
Q

Fundamental Keystroke in “top” Command - Shift+m

A

Sort process listing by memory usage; in descending order