[ale] differentiating processes from threads
Chris Fowler
cfowler at outpostsentinel.com
Tue Apr 2 09:17:07 EST 2002
The threading library does not act as a fork with some
IPC tying it together. At least that is not my perception
seen when using clone() in my programs to create threads. Maybe
Posix Threads does something like that but I have not explored PThreads.
I'm still using Linux native threads. I would look at total memory of
the parent heap + parent stack to get toal memory usage of the parent
abd child heaps. The child heaps are allocated in the parent stack.
Any memoy allocated by the child with malloc() would have to be looked
at under their processes entry.
Chris
-----Original Message-----
From: Tommie M. Jones [mailto:tj at atlantageek.com]
To: ale at ale.org
Sent: Tuesday, April 02, 2002 9:05 AM
To: John Wells
Cc: ale at ale.org
Subject: Re: [ale] differentiating processes from threads
Like Danny said, the way threads are implemented in Linux is not a true
threading model we've seen in other unicies. It's just another process.
So I guess the thread library just acts as a wrapper around fork and some
other ipc calls.
So with this in mind you could just look for processes that have the same
executable name as its parent process.
---------------------------
'Business Intelligence' is not an Oxymoron - http://www.intelliforge.com
On Tue, 2 Apr 2002, John Wells wrote:
> Awhile back I sent out a message regarding mozilla's apparent spawning of
> multiple processes with large memory footprints. Someone corrected me,
> stating that these were actually threads using shared memory and were just
> reported by top and ps -ef as seperate processes. They forwarded a ps
> string that returned some obscure indication of the fact that they were
> threads.
>
> I find myself in a situation where I need to be able to differentiate
> processes from threads. Can anyone help me out? The previously mentioned
> ps string would do, but I wonder what other ways exist?
>
> Thanks,
> John
>
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should
be
> sent to listmaster at ale dot org.
>
>
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.
More information about the Ale
mailing list