Re: Process vs. Threads

From: Hank Leininger (linux-kernel@progressive-comp.com)
Date: Wed Mar 07 2001 - 19:17:17 EST


On 2001-03-07, "Albert D. Cahalan" <acahalan@cs.uml.edu> wrote:

> Then for proper ps and top output, you need a reasonably efficient
> way to grab all threads as a group. This could be as simple as
> ensuring that /proc directory reads return related tasks together.
> This works too: /proc/42/threads/98 -> ../../98

For this (but not for other "proper thread support" things you mention)
would it be enough to have /proc publish some token that represent unique
->fs, ->mm, etc pointers? (The kernel-space address of each would work,
though that might be leaking too much info; the least userspace must treat
such values as opaque canary tokens.) This does not give you the most
efficient "ps --threads 231" but it does let ps, top, (fuser?), etc group
processes with the same vm, files, etc, no? ...I'm kinda surprised such a
thing doesn't already exist actually. Unless of course, it does exist, but
is not enough :-P

--
Hank Leininger <hlein@progressive-comp.com> 
  
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 07 2001 - 21:00:24 EST