Re: PID Length

From: Renison, Rick (rick.renison@EDS.COM)
Date: Sun Feb 08 2004 - 20:27:51 EST


Sorry guys. The answer is 8 in AIX5 and 7 in AIX4

#include <sys/proc.h>
main() {
Printf("max pid is %ld\n, PIDMAX);
}
Yields: max pid is 67108863

8 digits, 67108863= 0x'3FFFFFF' = 26 bits, leaving 6 bits unused
18 bits are used for the slot number in the proc table (17 in AIX4)
8 bits are used for an incrementing, even number (0-254) for each proc that
occupies the slot.
The only proc that doesn't follow this rule is init=1.

...Rick

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of Adam
Hanel
Sent: February 8, 2004 11:29 AM
To: aix-l@Princeton.EDU
Subject: Re: PID Length

I believe it's 6 on AIX v4 and 7 on AIX v5.
--Adam

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of
Basim Chafik
Sent: Wednesday, January 21, 2004 7:10 AM
To: aix-l@Princeton.EDU
Subject: PID Length

Hi AIXer,

Any body have any idea about what is the max digits a PID can get. A
programmer asked me this in order to allocate a size for t PID in the
application. The most I have seen is 7. Do you have any clue ?

Thanks.
Basim

****************************************************************************

This e-mail may be privileged and/or confidential, and the sender does not
waive any related rights and obligations. Any distribution, use or copying
of this e-mail or the information it contains by other than an intended
recipient is unauthorized. If you received this e-mail in error, please
advise me (by return e-mail or otherwise) immediately.

Ce courriel est confidentiel et protégé. L'expéditeur ne renonce pas aux
droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou
copie de ce message ou des renseignements qu'il contient par une personne
autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez
ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de
courriel ou par un autre moyen.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:34 EDT