The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
rules vrn Post Here to Contact Site Administrators and Moderators 2 03-21-2006 09:25 AM
Rules Tux Post Here to Contact Site Administrators and Moderators 2 01-20-2005 02:48 PM
rules? Xskwizitboi UNIX for Dummies Questions & Answers 1 12-02-2004 01:46 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-06-2008
astjen astjen is offline
Registered User
  
 

Join Date: May 2008
Location: France
Posts: 38
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 10:54 AM..
  #2 (permalink)  
Old 10-06-2008
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
  
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,617
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 09:52 AM..
  #3 (permalink)  
Old 10-06-2008
astjen astjen is offline
Registered User
  
 

Join Date: May 2008
Location: France
Posts: 38
Quote:
Originally Posted by bakunin View Post
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 (permalink)  
Old 10-10-2008
shockneck's Avatar
shockneck shockneck is offline Forum Advisor  
No RISC - No Fun
  
 

Join Date: Mar 2008
Location: Infractor's boudoir
Posts: 352
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.
Sponsored Links
Closed Thread

Bookmarks

Tags
kernel

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 09:46 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0