The value range of PID under Linux system __linux

Source: Internet
Author: User

General pid_max=0x8000 (can be changed), so the maximum value of the process number is 0x7fff, that is, 32767.

Process number 0-299 is reserved for the daemon process.

Now the kernel does not seem to have this limitation, "Linux kernel design and implementation" said in order to be compatible with the old version of Unix and Linux, the maximum PID default is 32767 (short int maximum), if you need to also do not consider and the old version of compatibility, modify/proc/ Sys/kernel/pid_max to increase the upper limit with echo to write a value to this file.


Since the general machine cannot run so many processes + threads at the same time, so 32768 is sure enough, but the system tends to allocate unused PID to the new process, so you will find that on the running system, there are many low PID is not used, because the start of the PID is used by other programs, Of course, you really have the ability to use the maximum PID, the system also has the solution, that is, from the beginning (low) search unused PID allocated to the new 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.