Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / July 2003

Tip: Looking for answers? Try searching our database.

Java threads in Windows 2000

Thread view: 
J.Eddy - 18 Jul 2003 17:54 GMT
Hola!

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?
Joseph Millar - 18 Jul 2003 18:37 GMT
> 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
Roedy Green - 18 Jul 2003 23:30 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.