Process Management Flashcards
What is a program?
a set of written instructions, stored in a system.
Could you explain the concept of a process?
a running instance of a program.
What are the various states that Linux processes can assume?
Running
Stopped
Zombie
Sleeping
Terminated
Uninterrupted Sleep
Can you elaborate on what interactive processes entail?
a process which acts on user input, example using -f with rm
How would you define a daemon process?
a process that is continuously running in the background and manages a particular task or service.
What steps allow a process to be moved to the background?
use & to send a process
into the background
for e.g. sleep 200 &.
How can a process be brought to the foreground?
jobs to get job id. then fg %jobid.
Which command is used to inspect background processes?
jobs
What purpose does the ps -aux command serve?
indicates the running processes along with the resources they are using. %cpu, %memory, time, state, terminal. unix based command
How is it possible to terminate a background process?
jobs -l to get pid/jobid
kill %jobid or
kill -9 pid or kill -15 pid
What is the method to list all active processes?
ps -ef
Is there a command to display a process and its child processes?
pstree <username> and/or
pgrep -l <processname>
How can a process be terminated using its name?
pkill <processname>
What sets apart the SIGTERM and SIGKILL signals?
SIGTERM kills the process gracefully, SIGKILL kills the process abruptly or forcefully.
Which signal enables a process to continue running even after the shell exits?
nohup – no hang
up.