File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes what is meant by Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "what is meant by "application doesnt work on Watch "what is meant by "application doesnt work on New topic
Author

what is meant by "application doesnt work on 'green thread' jvm"?

Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1863
hi all,
i know little about green threads. green threads work at application level as there is no mapping to the OS level threads.
my question is- when some application specification says that it doesn't run on JVMs that is based on "Green Thread", what does it really mean?
my guess to the answer is- as JVM supports only Green Threads, the application can't make promises about the application behavior due to the uncertainty in the Green Threads execution. Hence they say, the application won't work (rather than saying- it will misbehave may be?)
please help me ...
regards
maulin


1. Have fun @ http://faq.javaranch.com/java/JavaRaq
2. Looking for simple infix2postfix conversion and postfix evaluation package? Click here
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937
My understanding is that some earlier releases of JVMs had the "many threads to one thread" multithreading model where instead of mapping a user thread into an underlying OS thread, the JVM managed these thread internally, with its own scheduler, where the user threads were queued and mapped to one OS thread, one at a time. That resulted in severe performance problems, inability to make use of multiple processors, etc.
As far as I know, this "green threads" model has been replaced by the many-to-many model since then.
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1863
hi Eugene,
what u say makes sense! i wish we get more insights on this...
Jim...Michael...William....Cindy...Paul...where r u...?? would u leave this ranch hand alone, in the maze of green/native threads, starving to survive?? just ("key",Ding) :-)
regards
maulin
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
It probably means that they couldn't be bothered to stick yield() calls in long-running threads. As a consequence, a single thread can monopolise the CPU and starve out all others. Unless they did something really stupid, it will probably not malfunction on green thread JVMs, it will just be unusable.
By the way -- do not make the mistake of thinking that bartenders and sheriffs are necessarily the most knowledgeable ranchers.
- Peter
[ April 25, 2003: Message edited by: Peter den Haan ]
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1863
hi Peter...
sorry...i didnt really mean bartenders r most knowledgable or offend others in this way....i just threw in some names i'm most famailar with and unfortunately they turned out to be bartenders or sheriffs...
i didnt really mean rest ranchers r dumb as it includes me as well
btw, thanks of the answer. i was having similar doubt about s/w that said they might not work on green thread jvms..now i guess i am satisfied with what i know...
regards
maulin.
 
 
subject: what is meant by "application doesnt work on 'green thread' jvm"?
 
Threads others viewed
Threads
Thread Priority
Does "Java Threads" book discuss OS Platform Dependency issue?
system date change effect on green threaded application
Green and Native Thread
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com