Process Management Flashcards
What is a process?
The active execution of code that would otherwise be a file on a disk.
What are the types of processes?
User - has a controlling terminal (i.e. chronyc)
Daemon - no controlling terminal (i.e. chronyd)
What are the 3 relationships between processes?
1- All processes descend from PID 1 (init or systemd)
2- All others have a PID and a PPID
3- Parent processes spawn and manage children
What is PID?
Process ID
What is PPID?
Parent process ID
What is an orphan process?
Parent ends (orphans), init/systemd adopts orphan process
What is a zombie process?
Process ends, but parent doesn’t update status (false positive)
Where is process information located on a system?
/proc
How are processes managed?
Using the kill or killall command with signals (SIGTERM, SIGKILL, SIGHUP, etc.)
How are processes viewed?
ps, pstree, top commands
How does the process priority scale work?
Lowest numerical value = highest priority (-99)
Highest numerical value = lowest priority (99)
What command runs a program and assigns a process a specific nice value that affects the calculation of the process priority (which can be either increased or decreased)?
nice
What command changes the nice value of a running process without restarting it?
renice
How can a process be moved to the background?
Ctrl+z to pause the task, then bg to continue the task in the background
What is the difference between the kill and killall commands?
kill - kills process(es) by PID
killall - kills all processes by name (string)