- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: PID numbering on HPUX (again)
Operating System - HP-UX
1752782
Members
6050
Online
108789
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2011 04:08 AM
тАО01-20-2011 04:08 AM
PID numbering on HPUX (again)
(Yes there's an old thread on this subject but I need to see whether the info is still valid).
So does HPUX assign the lowest PID available? Or has that changed since 2003?
If I run a script that runs programA several times each run ALWAYS has a higher PID value. Even when I run the script several times.
ps -ef shows plenty of PID space below these PIDs.
So does HPUX assign the lowest PID available? Or has that changed since 2003?
If I run a script that runs programA several times each run ALWAYS has a higher PID value. Even when I run the script several times.
ps -ef shows plenty of PID space below these PIDs.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2011 06:30 AM
тАО01-20-2011 06:30 AM
Re: PID numbering on HPUX (again)
Wikipedia says this about PID assignment on Unix systems in general:
--------------
Under Unix, process IDs are usually allocated on a sequential basis, beginning at 0 and rising to a maximum value which varies from system to system. Once this limit is reached, allocation restarts at zero and again increases. However, for this and subsequent passes any PIDs still assigned to processes are skipped.
--------------
Source:
http://en.wikipedia.org/wiki/Process_identifier
As far as I know, this is pretty much how HP-UX does it, and has "always" done it (at least from version 10.20 onwards).
Once a PID is used by a process, it won't be reused by another process until the PID number allocation wraps around.
A simple "assign lowest available PID" would make it more complicated to detect that a particular process has died, especially in a situation where new processes are started frequently.
MK
--------------
Under Unix, process IDs are usually allocated on a sequential basis, beginning at 0 and rising to a maximum value which varies from system to system. Once this limit is reached, allocation restarts at zero and again increases. However, for this and subsequent passes any PIDs still assigned to processes are skipped.
--------------
Source:
http://en.wikipedia.org/wiki/Process_identifier
As far as I know, this is pretty much how HP-UX does it, and has "always" done it (at least from version 10.20 onwards).
Once a PID is used by a process, it won't be reused by another process until the PID number allocation wraps around.
A simple "assign lowest available PID" would make it more complicated to detect that a particular process has died, especially in a situation where new processes are started frequently.
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2011 07:53 AM
тАО01-20-2011 07:53 AM
Re: PID numbering on HPUX (again)
If I'm not being too intrusive, why do you
care what any PID is? Why not treat it as an
opaque (integer) value?
care what any PID is? Why not treat it as an
opaque (integer) value?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2011 01:25 AM
тАО01-22-2011 01:25 AM
Re: PID numbering on HPUX (again)
>Even when I run the script several times.
ps -ef shows plenty of PID space below these PIDs.
Right.
>MK: Once a PID is used by a process, it won't be reused by another process until the PID number allocation wraps around.
That's correct. Though on 11.31 they allow PIDs to be in the billions so I don't know what their wrap point is. There must be some highwater mark they don't exceed if still unused PIDs.
ps -ef shows plenty of PID space below these PIDs.
Right.
>MK: Once a PID is used by a process, it won't be reused by another process until the PID number allocation wraps around.
That's correct. Though on 11.31 they allow PIDs to be in the billions so I don't know what their wrap point is. There must be some highwater mark they don't exceed if still unused PIDs.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP