Thread Monitors?

Quasimodo KILLzdramboSPAMMERS at zdnetmail.com
Thu Sep 14 20:59:43 EDT 2000


Alex, thanks for that clear explanation.  I now understand what I asked for
didn't make sense.
It should have been obvious to me by looking at my code that the resources
are actually shared.
I didn't think the question through clearly before posting.

An example (hopefully clearing my cobwebs for good), in a situation where
thread A allocates a chunk of 10Mb of memory for processing, I wanted to see
that thread A had caused 10Mb of mem to be allocated for it's processing for
x amount of time.  But obviously (now that you've pointed it out), since any
thread could access that memory, the system can't say which thread is using
the resources, only what resources the app from which the thread was spawned
is using.  It makes sense.

Thanks for your input and patience with silly questions.

Jose


"Alex Martelli" <aleaxit at yahoo.com> wrote in message
news:8prj6l37vc at news1.newsguy.com...
> "Quasimodo" <KILLzdramboSPAMMERS at zdnetmail.com> wrote in message
> news:8pr5or$5ja2$1 at newssvr05-en0.news.prodigy.com...
>     [snip]
> > I can see total threads running in W98 (using System Monitor) currently.
> I
> > was looking for some sort of monitor that could show me individual
threads
> > and their resource usage (if possible), as opposed to just a total usage
> for
> > the app.
>
> Most resources are not assigned to a single thread, but rather accessible
> to all threads.  The stack and 'per-thread memory' are exceptions, but
> they're normally a very small part of the resources consumed.  If you
> used a per-thread heap (unusual, but doable) it would almost start to
> make sense.  But very few programs work that way; that threads SHARE
> memory is normally a key reason to have threads (rather than separate
> processes, for which sharing resources is the exception, not the rule).
>
>
> Alex
>
>
>





More information about the Python-list mailing list