pid number creation rules on aix


 
Thread Tools Search this Thread
Operating Systems AIX pid number creation rules on aix
# 1  
Old 10-06-2008
pid number creation rules on aix

Hello,

On a AIX 5.3.5.0 server, we have PID exceeding 999999. This cause some troubles in our programms.

I would like to know the process creation rules on aix :
- what is the maximum pid number ?
- what is the wrap limit on aix, and where to find it, how to configure pid wrap limit ?
- How pid are attributed ?
-...

thank you.

Last edited by astjen; 10-06-2008 at 11:54 AM..
# 2  
Old 10-06-2008
The best explanation i have found is this:

Quote:
If you look at pstat -a output, you can deduce that PID number is PSLOT number times a factor plus some offset.

On AIX53, I have PID=PSLOT*4096+offset
This page seems also to be helpful.

Maybe some guys who have attended the "kernel internals" class could expand on that?

May i ask about the background of this question?

I hope this helps.

bakunin

Last edited by bakunin; 10-06-2008 at 10:52 AM..
# 3  
Old 10-06-2008
Quote:
Originally Posted by bakunin
The best explanation i have found is this:


This page seems also to be helpful.

Maybe some guys who have attended the "kernel internals" class could expand on that?

May i ask about the background of this question?

I hope this helps.

bakunin
I modified my question, see above. Thank you.
# 4  
Old 10-10-2008
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

UNIX ksh - To print the PID number and repeat count

This question is asked in an interview today that I have to return output with each PID number and the count of each PID number logged today. Here is the script that I have written. Can you confirm if that would work or not. The interviewer didn't said if my answer is correct or not. Can someone... (5 Replies)
Discussion started by: Subodh Kumar
5 Replies

2. Shell Programming and Scripting

Get PID Number from “ps aux --sort -rss ”

Hi everyone How can I just get the PID of the following command: ps aux --sort -rss Thanks Regards (2 Replies)
Discussion started by: anonymuser
2 Replies

3. Red Hat

What is a PID number?

What is a PID number? (3 Replies)
Discussion started by: nariangel
3 Replies

4. AIX

AIX PID Recycling

Had a bizzare problem last night with one of our tools running on an AIX server that has not come up before. The tool has been in use for over a year without this problem showing up.The tool basically does this: -Kick off a background task and record the PIDGo and do a bunch of other taskswait for... (4 Replies)
Discussion started by: steadyonabix
4 Replies

5. UNIX for Advanced & Expert Users

Aix pid issue

Hi I have an IBM AIX 5.3 64Bit running with 64bit application (Kernel runs on 64bit also). I changed the maximum proccesses per user to the maximum. Currently the pids of proccesses in the system using 5 digits (<100000). Is it possible to make the system use pids bigger then 4500000? I need it... (6 Replies)
Discussion started by: idana
6 Replies

6. AIX

AIX: PID 0 Process

Hi All, I searched other threads and could not find any relevant post about this. I searched for process 0 in SUN OS and could find the sched/swapper process listed. root 0 0 0 Apr 25 ? 0:06 sched but i couldnt not find the swapper process (PID 0) in AIX. Is that... (4 Replies)
Discussion started by: quintet
4 Replies

7. Shell Programming and Scripting

Finding the nice(ni) number with PID?

Hi, is there a command that takes the PID of a process and that only diplays it's ni number? I`m pretty sure it would require pipes but I tried a few things that ended up miserably... Since the ps command doesn't show the ni unless I do ps -o ni but then I can't find a way to search the right... (2 Replies)
Discussion started by: Yakuzan
2 Replies

8. UNIX for Dummies Questions & Answers

pid from port number in AIX

Hello guys, How to shut down a port number in AIX. May be first I need to find out what is the process ID of that process that listens to this particular port.. Is there any command to find a process ID from the port number other than "lsof". thanks (1 Reply)
Discussion started by: solaix14
1 Replies

9. HP-UX

To find pid from port number

Hi, I am working on HP-UX Release 11i. I want to find the process id (PID) of the process running on a particular port. lsof command fuser does not work on this system. Please suggest some alternative. Thanks (6 Replies)
Discussion started by: gmat
6 Replies

10. UNIX for Advanced & Expert Users

restrain the number of digits of a PID

How is it possible under UNIX to restrain the number of digits of the PID number? For instance, we have a product that generates a PID of 7 digits, and we would like to have only 6 digits maximum instead for the PID. Thank you for your help. (1 Reply)
Discussion started by: mlefebvr
1 Replies
Login or Register to Ask a Question