[Mono-dev] Totally baffed! multithread app totally different on two environments with MONO

2005-10-24 Thread ted leslie
I have a server process written on Mono that spawns 400 threads,
runs great on one server,
I just installed in on a different server,
and the exact same program spawns ONE PROCESS for each thread (400 linux OS 
processes!!!)
where as on the original server it just is ONE PROCESS.
This is very twilight zone'ish, but the app still works (can't have as many 
threads on the newer).

I am sure there is a good answer to this, but I curtainly don't have it!

Anyone care to conjecture?

one server is SUSE 9.2 (which has only one process for the server app) (mono 
1.1.8),
the other server is a old redhat 9.X (mono 1.0.2)  with 2.4 kernel.

mono does threading different depending on whether 2.4.X vs. 2.6.X kernel ??
mono does threading different depending on mono 1.0.2 vs. mono 1.1.8 ??

-tl
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Totally baffed! multithread app totally different on two environments with MONO

2005-10-24 Thread Jonathan Pryor
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 ??

No.

 - Jon


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list