> Does anyone here know how Java threads map to Windows 2000 Fibers or
> Threads? That is does each java thread map to a Windows Kernal Thread
> 1:1 or does a java thread map to a fiber which maps to a Win Kernal
> thread n:m?
That depends on the JVM used. On Sun and IBM win32 JVM's,
each Java thread maps 1:1 to OS kernel threads. Thus
scheduling is handled by the OS and not the application.
--Joe
On 18 Jul 2003 09:54:51 -0700, jceddy@cox.net (J.Eddy) wrote or quoted
>That is does each java thread map to a Windows Kernal Thread
>1:1 or does a java thread map to a fiber which maps to a Win Kernal
>thread n:m?
What is the difference between a fiber and a thread in Windows jargon?
In the Java world, there are green threads and native threads. With
green threads, threads are faked using a single native thread.
The highest performance thread implementations use a combination of
both.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Joseph Millar - 19 Jul 2003 00:06 GMT
> What is the difference between a fiber and a thread in Windows jargon?
Jeffery Richter gives a good overview of fibers here:
http://www.microsoft.com/msj/archive/S20E4.aspx
I'm sure there are other treatments in different places.
> In the Java world, there are green threads and native threads. With
> green threads, threads are faked using a single native thread.
green threads have mostly disappeared. Historically JVM's
implement one or the other. Old Solaris and Linux JVM's had
both but you had to pick which one to use on startup. The
lastest JVM's support only native threads because they are
so much faster and more reliable.
> The highest performance thread implementations use a combination of
> both.
Depends on the use. You need OS level threads to take true
advantage of SMP hardware with a multi tasking OS. Fibers
and other types of user level threads can save time in context
switching, but it's going to be variable based on usage.
--Joe