[Mono-dev] Totally baffed! multithread app totally different on two environments with MONO
jonpryor at vt.edu
Mon Oct 24 21:18:56 EDT 2005
On Mon, 2005-10-24 at 21:12 -0400, ted leslie wrote:
> mono does threading different depending on whether 2.4.X vs. 2.6.X kernel ??
The handling of threading changed between Linux 2.4 and 2.6 with the
introduction of NPTL -- Native Posix Thread Libraries. 2.6 is far more
compliant with the POSIX standards.
The issue that you're seeing is that Linux doesn't have the concept of a
thread or process, it has the concept of a "task." Processes are just
how resources are handled. In particular, the Linux sys_clone() system
call allows new tasks to specify whether they use the same address space
as the caller (thus splitting between the process creation of fork(2)
vs. the thread creation of pthread_create()), as well as other resources
(file handles, signal handlers, etc.).
The deal is that all the 2.4 tools showed each thread as a distinct
process, because it _was_ a process (though it did share the process
address space with other threads). 2.6 introduced better support for
the POSIX standards, allowing the tools to better group by "process."
In short, you're not seeing a mono issue, you're seeing a Linux issue.
> mono does threading different depending on mono 1.0.2 vs. mono 1.1.8 ??
More information about the Mono-devel-list