Re: Green threads - some experience

2006-03-31 Thread Clemens Eisserer
For example, on Linux where each POSIX thread is a cloned process, it's Linux's fault (not the JVM's fault) if that doesn't scale well. For example, other OS's don't have such heavyweight threads. FreeBSD's KSE's are an example of a better tradeoff using M:N user:kernel threading. It seems

Re: Green threads - some experience

2006-03-31 Thread Archie Cobbs
Clemens Eisserer wrote: For example, on Linux where each POSIX thread is a cloned process, it's Linux's fault (not the JVM's fault) if that doesn't scale well. For example, other OS's don't have such heavyweight threads. FreeBSD's KSE's are an example of a better tradeoff using M:N user:kernel

Re: Green threads - some experience

2006-03-31 Thread Ian Rogers
Archie Cobbs wrote: IMHO using POSIX threads is the only right answer for a multi-platform JVM. You have no other choice except to leave it up to the specific platform to then implement POSIX threads efficiently. For example, on Linux where each POSIX thread is a cloned process, it's Linux's

Re: Green threads - some experience

2006-03-31 Thread Archie Cobbs
Ian Rogers wrote: Archie Cobbs wrote: IMHO using POSIX threads is the only right answer for a multi-platform JVM. You have no other choice except to leave it up to the specific platform to then implement POSIX threads efficiently. For example, on Linux where each POSIX thread is a cloned

Re: Green threads - some experience

2006-03-30 Thread David Griffiths
Ian Rogers wrote: The AWT peer problems were caused primarily by pthread mechanisms being used by GTK. These are wrapped in a library called gthreads. A Java thread would: 1) enter some native code that acquired a pthread mutex 2) call back into the JVM 3) the JVM would switch Java thread 4)

Re: Green threads - some experience

2006-03-30 Thread Andrew Haley
Ian Rogers writes: I think the long term view is to switch to POSIX threads. Having used the Jikes RVM for an OS like project, relying on native threads wouldn't have been desirable. In theory green thread context switches should be possible in a few instructions whereas a full context

Re: Green threads - some experience

2006-03-30 Thread Archie Cobbs
Andrew Haley wrote: I think the long term view is to switch to POSIX threads. Having used the Jikes RVM for an OS like project, relying on native threads wouldn't have been desirable. In theory green thread context switches should be possible in a few instructions whereas a full

Re: Green threads - some experience

2006-03-30 Thread Tom Tromey
Ian == Ian Rogers [EMAIL PROTECTED] writes: Ian I'd just like to describe my experiences of getting m-to-n threading Ian going with classpath gtk peers and the Jikes RVM. It could possibly be Ian instructive for developers and/or other JVMs. Thanks for writing this. What do you think of

Green threads - some experience

2006-03-29 Thread Ian Rogers
Hi, I'd just like to describe my experiences of getting m-to-n threading going with classpath gtk peers and the Jikes RVM. It could possibly be instructive for developers and/or other JVMs. There are different models of threading: 1) native threads: map Java threads to native pthreads -

Re: Green threads - some experience

2006-03-29 Thread Nic
Intersting post Ian. Maybe I'm linux 2.6 biased... but wouldn't simply using POSIX threads be so much better? NPTL is so nice. Nic

Re: Green threads - some experience

2006-03-29 Thread Ian Rogers
Hi Nic, I think the long term view is to switch to POSIX threads. Having used the Jikes RVM for an OS like project, relying on native threads wouldn't have been desirable. In theory green thread context switches should be possible in a few instructions whereas a full context switch takes a