getting process status

Boyd Roberts boyd at prl.dec.com
Tue May 14 21:14:32 AEST 1991


In article <4305 at pluto.dss.com>, cat at pluto.dss.com (Iain Wacey) writes:
> 
>  I need to be able to get the current status - sleeping, runnable, etc. -
> for all processes. Ineed to be able to do this within a device driver, a
> streams device. This is under System V.4. How can I get this information?

You do not want to do this.  Sounds like time for a re-design and a walk into
the hall of mirrors for a good hard geek at what you're trying to do.  Device
drivers just don't do that sort of thing.

Consider the ugliness of the whole thing.  You'll have to do it at splclock(),
so things don't change while you're looking.  And then, just how long is
that search going to take?  How often will it happen?  Remember: nothing
else will run (not even interrupts) during this search.

Think _very_ carefully -- and then think again.


Boyd Roberts			boyd at prl.dec.com

``When the going gets wierd, the weird turn pro...''



More information about the Comp.unix.wizards mailing list