CT320

CT320: Network and System Administration

Fall 2016

Processes

See this page as a slide show

CT 320: Network and System Administration

CHAPTER 5: CONTROLLING PROCESSES

Original slides from Dr. James Walden at Northern Kentucky University.

Topics

  1. Components
  2. Life cycle of a process
  3. Signals
  4. Process states
  5. /proc
  6. Monitoring processes

Components of a Process

Address space

Kernel’s internal data structures

Process Identification Numbers

User Identification Numbers

Group IDentification numbers

Priority

Nice Value

Control Terminal

Topics

  1. Components
  2. Life cycle of a process
  3. Signals
  4. Process states
  5. /proc
  6. Monitoring processes

Life cycle of a Process

fork()

exec()

clone()

systemd or upstart or init

wait()

Topics

  1. Components
  2. Life cycle of a process
  3. Signals
  4. Process states
  5. /proc
  6. Monitoring processes

Signals

Actions on Receipt of a Signal

Blocking or Ignoring Signals

Common Signals

#NameDescDefaultCatch?Block?Core?
1HUPHangupTermYYN
2INTInterruptTermYYN
3QUITQuitTermYYY
9KILLKillTermNNN
 BUSBus Errortermyyy
11SEGVSegfaultTermYYY
15TERMSW termTermYYN
 USR1User-def1TermYYN
 USR2User-def2TermYYN
 STOPStopStopNNN

What are Signals Used For?

What are signals used for?

What are signals used for?

What are signals used for?

Sending Signals

killall

Topics

  1. Components
  2. Life cycle of a process
  3. Signals
  4. Process states
  5. /proc
  6. Monitoring processes

Process States

StateMeaning
RunnableThe process can be executed
SleepingThe process is waiting for resources
ZombieThe process is waiting to die
StoppedThe process is suspended

Process States

Process States

Topics

  1. Components
  2. Life cycle of a process
  3. Signals
  4. Process states
  5. /proc
  6. Monitoring processes

/proc

/proc

Process info files in /proc

FileContents
cmdCommand or program the process is executing
cmdlineComplete command line of the process
cwdSymbolic link to the process’s current directory
environThe process’s environment variables
exeSymbolic link to the file being executed
fdSubdirectory containing links for each open descriptor
mapsMemory mapping info
rootSymbolic link to the process’s root directory
statGeneral process status information
statmMemory usage information

Topics

  1. Components
  2. Life cycle of a process
  3. Signals
  4. Process states
  5. /proc
  6. Monitoring processes

ps & top

ps:

top:

strace

Runaway processes

Modified: 2015-09-05T17:07

User: Guest

Check: HTML CSS
Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building