Module 11 Flashcards
What is a process in an operating system?
A process is a running program with associated information such as Process Identifier (PID), scheduling priority, memory context, file descriptors, and security references.
What are the different process statuses?
- R: Running or ready to run.
- S: Sleeping (waiting for an event).
- T: Traced or stopped.
- D: Non-interruptible sleeping (waiting for I/O).
- Z: Zombie (terminated but not cleaned up).
Which command is used to display information about all running processes?
ps -A or ps -ef.
What does the ps -f command display?
It shows processes in full-format, with detailed information like UID, PID, PPID, CPU usage, start time, and command name.
What does the ps aux command provide?
It displays processes from all users, with user/owner information and processes not started from a terminal.
What is a PID?
Process Identifier, a unique number assigned to each process.
What is a PPID?
The Parent Process Identifier, indicating the parent process of a given process.
What does the CMD column in the ps output represent?
The command that started the process, including its name, options, and arguments.
What is the difference between foreground and background processes?
Foreground processes require user input and run visibly, while background processes do not require user interaction and run in the background.
What command is used to terminate a process using its PID?
kill <PID>.</PID>
What does the killall command do?
Terminates all processes with a specified name.
What is the default signal sent by the kill command?
SIGTERM (signal number 15).
What signal is used for forced termination?
SIGKILL (signal number 9).
What is a Zombie process?
: A terminated process that has not been cleaned up by its parent process.
How do you suspend a foreground job?
Press CTRL+Z.
Which command resumes a suspended job in the background?
bg.
Which command resumes a suspended job in the foreground?
fg.
What does the jobs command display?
A list of all background and suspended jobs.
How do you prioritize processes using niceness values?
By using the nice or renice commands.