• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Silly question - PIDs in XP

VirtualLarry

No Lifer
As the title - unlike most *nix systems and W2K, XP's PIDs get re-used (though not duplicated), and ... well, it just seems strange to me. I realize that this re-use of now-defunct PIDs, may be a less-brittle method of dealing with PIDs on long-running systems, as eventually a linear PID increment would wrap around, and potentially start duplicating PIDs. But it sure is disconcerting, to see child processes, and non-system processes, with really low PID numbers. Is it known why MS did this? Just curious.
 
Originally posted by: n0cmonkey
I'm slow today (yeah yeah). You want predictable PIDs?

Since simply knowing some process's PID isn't a security issue that I can think of, given any reasonable OS support for permissions/ACLs, then yes, I would much prefer them. It's just odd, looking at a PID/task-list, and seeing more-recently-started child processes with lower PIDs than even long-running system processes. I guess it's just a question of personal preference, there's no technical reason that they couldn't be based on a one-way hash of the process's kernel-memory descriptor structure's address, or something like that (assuming that they filter out dupes).

But to me, non-predictable PIDs, would be like the OS randomly assigning drive letters (out of the pool of available ones), for newly-discovered volumes.

(For the record, I'm not a fan of Mozilla's profile-directory pathname "salting" process either.)
 
Well... It could help writing *.bat files (since a certain process would have own PID). If that's the only purpose, then it's not worth it.
 
But to me, non-predictable PIDs, would be like the OS randomly assigning drive letters (out of the pool of available ones), for newly-discovered volumes.

Typical VL overblown comparison. Suprised you haven't claimed its a MS comspiracy against you yet.. Drive letters are user interface items, 'randomly' assiging them is much more problematic. As for PIDS, they are there for compatibility reasons, they don't really matter. The system is object based, grab a handle to the process you care about.

Bill
 
Doing a quick search on google brings up at least one reference to a race condition that OpenBSD's random pids prevented...
 
Unix-based systems switched to slightly randomized PIDs among other things for the benefit of stupid programs which created fils in /tmp with the pid in the filename - which is a security risk. Randomization lessens the risk without changing those programs.
 
Originally posted by: bsobel
But to me, non-predictable PIDs, would be like the OS randomly assigning drive letters (out of the pool of available ones), for newly-discovered volumes.

Typical VL overblown comparison. Suprised you haven't claimed its a MS comspiracy against you yet.. Drive letters are user interface items, 'randomly' assiging them is much more problematic. As for PIDS, they are there for compatibility reasons, they don't really matter. The system is object based, grab a handle to the process you care about.

Bill

agreed
 
As the title - unlike most *nix systems and W2K, XP's PIDs get re-used (though not duplicated), and ... well, it just seems strange to me

unix systems reuse PIDs as well, it's just that if the PIDs aren't being randomly generated the list has to wrap before they get reused. I believe Linux wraps after 32K PIDs.

But it sure is disconcerting, to see child processes, and non-system processes, with really low PID numbers. Is it known why MS did this? Just curious.

If it's disconcerting you're worrying about the wrong things. The PID of a process should be irrelevant except for when you want to send it a signal and then you should be finding the PID, not predicting what it will be.
 
But it sure is disconcerting, to see child processes, and non-system processes, with really low PID numbers. Is it known why MS did this? Just curious.

Disconcerting ---> [Larry to English translator] ---> There has to be something in here that Microsoft developers, who know far more than me, are doing wrong so that I can start a completely irrelevant, long winded, discussion in which I try to make myself look smart by arguing minute, trivial, and useless details comparing it to some other OS with a completely different architecture in which the details are expected to be different.

Long winded run on sentence above ---> [Smilin to English translator] ---> DILLIGAF?
 
Originally posted by: Haden
I don't understand why some answers are so bitter.
It seems that question should rather be why some OSes don't generate random pids:
linux patch info,
discussion thread

Hehe, You'll understand after you get to know Larry. Ask him about pagefiles or something 😛

If anyone else had asked this may have turned into a real discussion by now.
 
Predictable PIDs?
No outbound firewall??
MS conspiracy to control my every thought??????

--What goes through VL's brain before it explodes.

😉
 
Originally posted by: Smilin
But it sure is disconcerting, to see child processes, and non-system processes, with really low PID numbers. Is it known why MS did this? Just curious.

Disconcerting ---> [Larry to English translator] ---> There has to be something in here that Microsoft developers, who know far more than me, are doing wrong so that I can start a completely irrelevant, long winded, discussion in which I try to make myself look smart by arguing minute, trivial, and useless details comparing it to some other OS with a completely different architecture in which the details are expected to be different.
Except that entire tirade is completely off-base and wrong.

I was simply commenting on the fact that under XP, PIDs appear to be non-sequential, like W2K (and most *nix), and it's extremely convenient, to list tasks sorted by PID, because that lists them in the relative order in which the processes started. For someone that is used to that, it is a bit disconcerting.

But my simple question was, in reference to XP - why?

But all of the other all-knowing souls on this board, themselves also (apparently) lacking an answer, decided to flame me instead. Fine.
 
Back
Top