nerdexam
CompTIA

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.

System Architecture

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)
  • B
    6% (2)
  • C
    91% (29)
  • D
    3% (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.

A-1

-1 is not a valid PID; negative PIDs are used in some system calls to refer to process groups, not individual processes.

B0

PID 0 is reserved for the kernel idle/swapper process and is never assigned to a user-space program.

C1Correct

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.

DIt is different with each reboot.

PID 1 is always assigned to init regardless of the reboot; it is not randomly assigned.

EIt is set to the current run level.

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

#init#PID 1#boot process#process hierarchy

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice