Results 1 to 2 of 2
- 01-08-2010, 07:42 AM #1Member
- Join Date
- Jan 2010
- Rep Power
Join, basic question about threadHowever, as with sleep, join is dependent on the OS for timing, so you should not assume that join will wait exactly as long as you specify.
1-Is it only for times that we specify a time in join() method?
2-Is it right for wait() method?
3-Is it the Os or is it the JVM choose which thread to run?
4-Who is "thread scheduler" here? is it part of OS or JVM?
- 01-13-2010, 01:01 AM #2
The JVM uses OS resources to handle things like threads. What the quote is getting at is that you cannot count on the OS to do everything the very millisecond you expect it to. Generally, it is pretty close, but don't count on it to determine the order in which processes will do their work.
The OS handles the threads; the JVM can set parameters according to what the OS allows. Note that things like priority may not work on the OS as Java seem to indicate. For example, Java may have more priority levels than the OS, so two Java levels may end up setting the same OS level.
I hope that helps...
- By casid in forum JavaServer Pages (JSP) and JSTLReplies: 4Last Post: 12-28-2009, 07:51 PM
- By sandeepsai39 in forum New To JavaReplies: 5Last Post: 04-20-2009, 06:51 AM
- By madthinker in forum New To JavaReplies: 7Last Post: 01-26-2009, 08:09 PM
- By javaplus in forum Enterprise JavaBeans (EJB)Replies: 2Last Post: 07-15-2008, 05:44 PM
- By gvi in forum New To JavaReplies: 2Last Post: 10-30-2007, 07:30 PM