I have checked two linux systems, both were of 64 bit but PID_MAX is different for both of them.
On one system
cat /proc/sys/kernel/pid_max 32768
Whereas on other, it was
cat /proc/sys/kernel/pid_max 65536
From proc man pages.
proc/sys/kernel/pid_max This file (new in Linux 2.5) specifies the value at which PIDs wrap around (i.e., the value in this file is one greater than the maximum PID). The default value for this file, 32768, results in the same range of PIDs as on earlier kernels. On 32-bit platfroms, 32768 is the maximum value for pid_max. On 64-bit systems, pid_max can be set to any value up to 2^22 (PID_MAX_LIMIT, approximately 4 million).
Please note, both of these system were having same linux kernel.
Now, my question is what are factors which are responsible for changing pid_max? Thank you in advance.