Operations on Processes

    • Other ways in which a process can terminate are:
      1. When there are insufficient resources for the process to work with.
      2. When a process ‘kill’ signal or another type of irrecoverable interrupt occurs.
      3. When an illegal or faulty instruction was executed. E.g.: when we have a stack overflow or when we attempt to access an address that hasn’t been rightfully allocated by the program.
    • If a parent didn’t wait for the child to terminate, which resulted in the parent terminating before the child, the still-running child process is called an orphan.
    • When a child finished running and doesn't yet release its resources (e.g., allocated array in memory,) but the parent doesn’t wait for it, the child is called a zombie.
    • To eliminate orphans and zombies, the init process will, from time to time, check upon the running processes and will adopt all orphan and zombie processes to terminate them.