Pergunta de entrevista da empresa Google

Qhich is the relation between the init process and zombie processes.

Respostas da entrevista

Sigiloso

25 de jun. de 2015

Init cleans the zombie processes, When a process become "zombie", init becomes his parent and deletes it from the process list.

1

Sigiloso

27 de jun. de 2022

A zombie process is a child process whose parent has not reaped its return code (and thus the child process, while exited, still has its PID in the OS's process table and has not released its resources e.g., memory). In order to kill a zombie, the parent process must be terminated. When this occurs, the zombie becomes an orphan and is reparented to the init process. The init process then reaps the child's exit code, thus removing it from the OS's process table and freeing its resources.