Podcast
Questions and Answers
What is the primary distinction between a program and a process?
What is the primary distinction between a program and a process?
In process management, what does the term 'PID' refer to?
In process management, what does the term 'PID' refer to?
Which term describes processes that provide essential system and network services and are usually started at system startup?
Which term describes processes that provide essential system and network services and are usually started at system startup?
What is a child process in relation to its parent process?
What is a child process in relation to its parent process?
Signup and view all the answers
Which term is used to refer to a process that is not associated with a terminal?
Which term is used to refer to a process that is not associated with a terminal?
Signup and view all the answers
What does 'PPID' stand for in process management?
What does 'PPID' stand for in process management?
Signup and view all the answers
When a user starts a process from the terminal, how is that process labeled?
When a user starts a process from the terminal, how is that process labeled?
Signup and view all the answers
What is true about the relationship between parent and child processes?
What is true about the relationship between parent and child processes?
Signup and view all the answers
What does the PPID represent in the output of the ps command?
What does the PPID represent in the output of the ps command?
Signup and view all the answers
What information does the ps --f command primarily provide about each process?
What information does the ps --f command primarily provide about each process?
Signup and view all the answers
Which option can be added to the ps command to include all processes across all terminals?
Which option can be added to the ps command to include all processes across all terminals?
Signup and view all the answers
Why are daemon processes not listed in the output of the ps --f command?
Why are daemon processes not listed in the output of the ps --f command?
Signup and view all the answers
What is the purpose of using the grep command with the ps command?
What is the purpose of using the grep command with the ps command?
Signup and view all the answers
What does the '?' symbol in the TTY column indicate in the process listing?
What does the '?' symbol in the TTY column indicate in the process listing?
Signup and view all the answers
What would the output of the ps command display regarding time if a process ran for less than one second?
What would the output of the ps command display regarding time if a process ran for less than one second?
Signup and view all the answers
Which process typically has a PID of 2 in a Linux environment?
Which process typically has a PID of 2 in a Linux environment?
Signup and view all the answers
What is the PID of the init daemon in a Linux system?
What is the PID of the init daemon in a Linux system?
Signup and view all the answers
What represents the Parent Process ID (PPID) of the init daemon?
What represents the Parent Process ID (PPID) of the init daemon?
Signup and view all the answers
Which of the following statements best describes the relationship between processes in Linux?
Which of the following statements best describes the relationship between processes in Linux?
Signup and view all the answers
Which command is considered the most versatile for viewing processes in Linux?
Which command is considered the most versatile for viewing processes in Linux?
Signup and view all the answers
In a Linux system that uses Systemd for initialization, what will the init process likely appear as?
In a Linux system that uses Systemd for initialization, what will the init process likely appear as?
Signup and view all the answers
What is the relationship between Process number 1 and Process number 2?
What is the relationship between Process number 1 and Process number 2?
Signup and view all the answers
What does the process state 'R' indicate in the ps command output?
What does the process state 'R' indicate in the ps command output?
Signup and view all the answers
Which statement accurately reflects the nature of Linux process IDs (PIDs)?
Which statement accurately reflects the nature of Linux process IDs (PIDs)?
Signup and view all the answers
After logging in to a Linux system, the role of the BASH shell is to:
After logging in to a Linux system, the role of the BASH shell is to:
Signup and view all the answers
Which of the following best describes a zombie process?
Which of the following best describes a zombie process?
Signup and view all the answers
What does the flag 'F' indicate in the output of the ps command?
What does the flag 'F' indicate in the output of the ps command?
Signup and view all the answers
Which command is used to view a list of zombie processes in the system?
Which command is used to view a list of zombie processes in the system?
Signup and view all the answers
What does the 'NI' (nice value) affect in a process?
What does the 'NI' (nice value) affect in a process?
Signup and view all the answers
How is process priority measured in the Linux kernel?
How is process priority measured in the Linux kernel?
Signup and view all the answers
What is indicated by a process state of 'D'?
What is indicated by a process state of 'D'?
Signup and view all the answers
Which of the following is true about the --l option used with the ps command?
Which of the following is true about the --l option used with the ps command?
Signup and view all the answers
Study Notes
Processes on a Linux System
- A program is an executable file stored on disk.
- A process is a program running in memory and on the CPU, essentially a program in action.
-
User processes are programs that run in a terminal, for example:
ls
,grep
, andfind
. - Daemon processes run in the background, typically started at system startup, and provide system services like printing, scheduling, and network services.
- Every process has a unique Process ID (PID) used by the kernel for identification.
- Processes can start other processes, known as child processes.
- Each process has a Parent Process ID (PPID), identifying the process that started it.
Process Management
- The init daemon is the first process started by the Linux kernel, with a PID of 1 and a PPID of 0 (referring to the kernel).
- The init daemon launches most other daemons during system initialization, including those that allow for user logins.
- After a user logs in, the login program starts a BASH shell, which interprets user commands and starts user processes.
- The ps command is used to view processes, displaying a list of processes running in the current shell by default.
- Using the
--e
option with theps
command shows all processes across terminals and daemons. - The
--f
option with theps
command provides more information about each process, including UID, PPID, STIME, and CPU utilization. - The
--l
option with theps
command displays even more detailed information, including process flags, process state, priority, and nice value.
Process States
- The process state (S) column in the ps command output indicates what the process is currently doing.
- Common states include:
- S (interruptible sleep): Process is not running on the CPU but is waiting to be awakened by other processes.
- R (running): Process is currently running on the CPU.
- D (uninterruptible sleep): Process is waiting for disk access.
- T (stopped): Process is stopped or being traced by another process.
- Z (zombie process): Process has finished executing but is waiting for its parent process to release its PID.
Zombie Processes
- Zombie processes occur when a process finishes executing but is waiting for its parent process to release its PID.
- They can accumulate and prevent new processes from being created.
- Killing the parent process of zombie processes can resolve this issue.
Process Prioritization
- Process priority (PRI) is measured between 0 (high priority) and 127 (low priority).
- Nice value (NI) indirectly affects process priority, measured between -20 (higher chance of high priority) and 19 (higher chance of low priority).
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This quiz explores the concepts of programs and processes within a Linux operating system. Learn about user processes, daemon processes, Process IDs (PIDs), and the structure of process management. Understand how the init daemon plays a pivotal role in system initialization.