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?
- A program is a running instance of an application, while a process is a file on the hard disk.
- A program is an executable file on the hard disk, while a process is that executable file running in memory. (correct)
- A process can exist without a parent process.
- A program is always stored in the CPU's cache.
In process management, what does the term 'PID' refer to?
In process management, what does the term 'PID' refer to?
- Process Identification Number (correct)
- Personal ID for user login
- Process Indicator Device
- Program Instance Descriptor
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?
- Transient processes
- Detached processes
- Daemon processes (correct)
- User processes
What is a child process in relation to its parent process?
What is a child process in relation to its parent process?
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?
What does 'PPID' stand for in process management?
What does 'PPID' stand for in process management?
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?
What is true about the relationship between parent and child processes?
What is true about the relationship between parent and child processes?
What does the PPID represent in the output of the ps command?
What does the PPID represent in the output of the ps command?
What information does the ps --f command primarily provide about each process?
What information does the ps --f command primarily provide about each process?
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?
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?
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?
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?
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?
Which process typically has a PID of 2 in a Linux environment?
Which process typically has a PID of 2 in a Linux environment?
What is the PID of the init daemon in a Linux system?
What is the PID of the init daemon in a Linux system?
What represents the Parent Process ID (PPID) of the init daemon?
What represents the Parent Process ID (PPID) of the init daemon?
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?
Which command is considered the most versatile for viewing processes in Linux?
Which command is considered the most versatile for viewing processes in Linux?
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?
What is the relationship between Process number 1 and Process number 2?
What is the relationship between Process number 1 and Process number 2?
What does the process state 'R' indicate in the ps command output?
What does the process state 'R' indicate in the ps command output?
Which statement accurately reflects the nature of Linux process IDs (PIDs)?
Which statement accurately reflects the nature of Linux process IDs (PIDs)?
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:
Which of the following best describes a zombie process?
Which of the following best describes a zombie process?
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?
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?
What does the 'NI' (nice value) affect in a process?
What does the 'NI' (nice value) affect in a process?
How is process priority measured in the Linux kernel?
How is process priority measured in the Linux kernel?
What is indicated by a process state of 'D'?
What is indicated by a process state of 'D'?
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?
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 theÂps
 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.