An AIX PID is composed of the process table slot number and a generation count. Depending on whether you use a 32-Bit or a 64-Bit kernel the format differs slightly. In a 32-Bit Kernel it is a 32-Bit number and a 64-Bit number in the 64-Bit Kernel. However in both cases only the first 26 Bits are being used actually. E.g.
Code:
Bit: 31 ... 26 | 25 .................................... 8 | 7 ..... 1 | 0
Usage: 000000 | Process table slot index | Gen.count | 0
- Bit 0 is always zero, therefore every
Process ID except for init is an even number.
- The genereation count is used to prevent PID being used again to often. I.e. every process slot can be used 128 times before a formerly used PID is reused.
- The process table slot index is the process table slot number.
- The remaining bits are unused.
- If you see a PID with an uneven number you found a
Thread ID.
With a 64-Bit Kernel it works like this:
Code:
Bit: 63 ............. 26 | 25 ............... 12 | 11 ... 8 | 7 ..... 1 | 0
Usage: 000....000 | PTSI low order bits | SRAD | Gen.count | 0
SRAD stands for Scheduler Resource Affinity Domain. Those bits are used to select the zone of the process table. The number of SRAD bits is version/release dependent. 5.1 uses 5 bits, 5.2 and 5.3 use 4 bits.