Amazon Interview Question

what is pid of init process,

Interview Answer

Anonymous

Oct 16, 2020

PID is the number used by operating system kernel to uniquely identify an active process. There are two tasks with specially distinguished process IDs. 1) Swapper or sched with pid as 0 and is responsible for paging. 2) Init with pid as 1 is responsible for starting or shutting down the system. The current process ID is provided by the getpid() system call or as a variable $$ in shell.

3