Sponsored Content
Operating Systems AIX pid number creation rules on aix Post 302245682 by shockneck on Friday 10th of October 2008 04:43:00 PM
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. Red Hat

What is a PID number?

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

9. 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

10. 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
glutInitDisplayMode(3GLUT)					       GLUT						glutInitDisplayMode(3GLUT)

NAME
glutInitDisplayMode - sets the initial display mode. SYNTAX
#include <GLUT/glut.h> void glutInitDisplayMode(unsigned int mode); ARGUMENTS
mode Display mode, normally the bitwise OR-ing of GLUT display mode bit masks. See values below: GLUT_RGBA Bit mask to select an RGBA mode window. This is the default if neither GLUT_RGBA nor GLUT_INDEX are specified. GLUT_RGB An alias for GLUT_RGBA. GLUT_INDEX Bit mask to select a color index mode window. This overrides GLUT_RGBA if it is also specified. Note that color index modes are not supported on Mac OS X. GLUT_SINGLE Bit mask to select a single buffered window. This is the default if neither GLUT_DOUBLE or GLUT_SINGLE are specified. GLUT_DOUBLE Bit mask to select a double buffered window. This overrides GLUT_SINGLE if it is also specified. GLUT_ACCUM Bit mask to select a window with an accumulation buffer. GLUT_ALPHA Bit mask to select a window with an alpha component to the color buffer(s). GLUT_DEPTH Bit mask to select a window with a depth buffer. GLUT_STENCIL Bit mask to select a window with a stencil buffer. GLUT_MULTISAMPLE Bit mask to select a window with multisampling support. If multisampling is not available, a non-multisampling window will automat- ically be chosen. Note: both the OpenGL client-side and server-side implementations must support the GLX_SAMPLE_SGIS extension for multisampling to be available. GLUT_STEREO Bit mask to select a stereo window. GLUT_LUMINANCE Bit mask to select a window with a ``luminance'' color model. This model provides the functionality of OpenGL's RGBA color model, but the green and blue components are not maintained in the frame buffer. Instead each pixel's red component is converted to an index between zero and glutGet(GLUT_WINDOW_COLORMAP_SIZE)-1 and looked up in a per-window color map to determine the color of pix- els within the window. The initial colormap of GLUT_LUMINANCE windows is initialized to be a linear gray ramp, but can be modified with GLUT's colormap routines. DESCRIPTION
The initial display mode is used when creating top-level windows, subwindows, and overlays to determine the OpenGL display mode for the to- be-created window or overlay. Note that GLUT_RGBA selects the RGBA color model, but it does not request any bits of alpha (sometimes called an alpha buffer or destina- tion alpha) be allocated. To request alpha, specify GLUT_ALPHA. The same applies to GLUT_LUMINANCE. The glutInitDisplayString routine provides a more powerful way to select frame buffer capabilities for GLUT windows. GLUT_LUMINANCE IMPLEMENTATION NOTES GLUT_LUMINANCE is not supported on most OpenGL platforms. SEE ALSO
glutInit, glutCreateWindow, glutInitDisplayString AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutInitDisplayMode(3GLUT)
All times are GMT -4. The time now is 06:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy