Zombie Process Analysis

Source: Internet
Author: User

A zombie process is not a wait sub-process after the parent process fork. When a sub-process exits, the kernel releases all resources of the process, such as file descriptors, memory, and so on. However, it still retains certain information for the process, the reserved information is released only after the parent process of the process is wait. If the parent process does not have wait, the child process becomes a zombie process. In highly concurrent servers, zombie processes are very harmful. If there are too many zombie processes, a large number of process numbers will be occupied by them, but the processes that the system can use are limited. If the zombie process cannot be provided as many as the process numbers of new processes, the server will remain in the rejected state. Www.2cto.com, but the parent process of the High-concurrency server will certainly fork many sub-processes, and it is possible that the parent process does not need to know the end information of any sub-process. If you still have wait for each sub-process, it will certainly lead to a large amount of good fortune in resources. In this case, there is a very simple but very effective method. When the sub-process exit (), the kernel sends a SIGCHLD signal to the parent process. Set the signal processing method to SIG_IGN, so that the parent process can ignore the SIGCHLD signal sent by the child process.

Related Article

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.