A process terminates when it finished executing the last instruction and asks the OS to delete it by using the exit() sys call.

Some systems do not allow a child to exists if parent has been terminated (cascading termination).

When a process terminates its resource are deallocated but the entry in the process table must remai there until parent calls wait(). A zombie process is a child process which is terminated but whose parent has not yet called wait(). All processes briefly transitions to this state.

A more serious state is the orphan, which means that the parent did not call wait() but instead terminated. In this case, they are reassigned to the init process as the new parent.

See also

References

  • A. Silberschatz, P. B. Galvin, e G. Gagne, «Operating System Concepts».