From: Gregory Maxwell <greg@linuxpower.cx>
To: Jorge David Ortiz Fuentes <jorge_ortiz@hp.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Process vs. Threads
Date: Tue, 6 Mar 2001 11:58:23 -0500 [thread overview]
Message-ID: <20010306115822.A2244@xi.linuxpower.cx> (raw)
In-Reply-To: <20010306172843.D1283@hpspss3g.spain.hp.com>
In-Reply-To: <20010306172843.D1283@hpspss3g.spain.hp.com>; from jorge_ortiz@hp.com on Tue, Mar 06, 2001 at 05:28:43PM +0100
On Tue, Mar 06, 2001 at 05:28:43PM +0100, Jorge David Ortiz Fuentes wrote:
[snip]
> "task" that can be run. Using this structure makes easier to identify
> which threads belong to the same process and tools such as ps or top
> show the TID as a field.
>
> I understand that changing this in the Linux kernel would mean that:
> * some tools will have to be modified.
> * the proc filesystem should create a directory using the TID instead
> of the PID.
> * some features as VM handling, signaling or exec()ing from a thread
> would be more difficult to implement.
> * compatibility will be broken.
>
> However, I miss some way to indicate that two processes are, in
> fact, threads of the same process. Maybe there is something I'm
> missing. Let me elaborate this.
[snip]
> This information is missleading since there is no way to know that
> these 9 threads are sharing memory. If you run 'ps axl' you can see
> the hierarchy as if it was a multiprocess program, i.e. no difference
> to show you that they are threads. Not even reading
> /proc/<pid>/status you get info about these being threads.
[snip]
There are no threads in Linux.
All tasks are processes.
Processes can share any or none of a vast set of resources.
When processes share a certain set of resources, they have the same
characteristics as threads under other OSes (except the huge performance
improvements, Linux processes are already as fast as threads on other OSes).
Execution contexts which share resources do not have to share memory. If we
implemented top to aggregate such processes (as you suggest), the result
would also be potentially misleading.
If we were to break compatibility it should be actually fix the situation,
not replace once misleading situation with another.
Sometimes it is handy to view a collection of execution contexts as a
singular object. However, such is also the case with a service implemented
as a collection of share-none standard unix processes (like postfix). A
better solution would be a more generalized system for service object
management. Such a solution could likely be implemented without kernel
intervention (though perhaps a general facility to determine what shares what
with who might be needed).
next prev parent reply other threads:[~2001-03-06 16:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-06 16:28 Process vs. Threads Jorge David Ortiz Fuentes
2001-03-06 16:58 ` Gregory Maxwell [this message]
2001-03-07 9:01 ` Helge Hafting
2001-03-07 23:30 ` Albert D. Cahalan
2001-03-08 3:09 ` David Schwartz
-- strict thread matches above, loose matches on Subject: below --
2001-03-06 17:01 Dan Kegel
2001-03-06 17:32 ` Ulf Carlsson
2001-03-08 0:17 Hank Leininger
2001-03-09 9:48 ` Albert D. Cahalan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010306115822.A2244@xi.linuxpower.cx \
--to=greg@linuxpower.cx \
--cc=jorge_ortiz@hp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox