Process under Linux (orphan process, zombie process)

Source: Internet
Author: User
Tags memory usage

Linux provides a mechanism that can be obtained if the parent process wants to know the state information at the end of the child process. The mechanism is that when each process exits, the kernel frees all the resources of the process, including open files, memory usage, and so on. However, it still retains certain information (including process number, exit status, run time, etc.). Until the parent process passes wait/waitpid to fetch poem release.
Orphan process: One parent process exits, and one or more of its sub-processes are still running, then those child processes will become orphans. The orphan process will be adopted by the INIT process (process number 1) and the Init process completes the state collection for them.
Zombie Process: A process uses Fock to create a child process, and if the child process exits, and the parent process does not use WAIT/WAITPID to get state information for the child process, the process descriptor of the child process is still stored in the system. This process is called a zombie process.
The zombie process is not the root of the problem, the main culprit is the parent process that produces a lot of zombie processes, so the solution is to kill the parent process, so the zombie process will be accepted by the Init process, released.

Process under Linux (orphan process, zombie process)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.