LX0-103 · Question #178
Which of the following is the process ID number of the init program?
The correct answer is C. 1. The init process is always assigned PID 1 and is the first user-space process started by the kernel at boot.
Question
Which of the following is the process ID number of the init program?
Options
- A-1
- B0
- C1
- DIt is different with each reboot.
- EIt is set to the current run level.
How the community answered
(32 responses)- B6% (2)
- C91% (29)
- D3% (1)
Why each option
The init process is always assigned PID 1 and is the first user-space process started by the kernel at boot.
-1 is not a valid PID; negative PIDs are used in some system calls to refer to process groups, not individual processes.
PID 0 is reserved for the kernel idle/swapper process and is never assigned to a user-space program.
The Linux kernel hard-codes PID 1 to the init process (or its modern replacement such as systemd). It is the ancestor of all other user-space processes and its PID never changes across reboots. No other process can hold PID 1 while init is running.
PID 1 is always assigned to init regardless of the reboot; it is not randomly assigned.
The run level is a system state value entirely unrelated to process ID assignment.
Concept tested: Linux init process PID assignment
Source: https://man7.org/linux/man-pages/man1/init.1.html
Topics
Community Discussion
No community discussion yet for this question.