Results 1 to 2 of 2
  1. #1
    simorgh is offline Member
    Join Date
    Jan 2010
    Posts
    25
    Rep Power
    0

    Default Join, basic question about thread

    However, 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.
    Joins (The Java™ Tutorials > Essential Classes > Concurrency)

    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?

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    7

    Default

    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...

Similar Threads

  1. Basic JSP question..
    By casid in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 12-28-2009, 07:51 PM
  2. Thread.sleep() and join() question
    By sandeepsai39 in forum New To Java
    Replies: 5
    Last Post: 04-20-2009, 07:51 AM
  3. Basic question on OOP.
    By madthinker in forum New To Java
    Replies: 7
    Last Post: 01-26-2009, 08:09 PM
  4. Basic question about EJB
    By javaplus in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 07-15-2008, 06:44 PM
  5. Very basic question
    By gvi in forum New To Java
    Replies: 2
    Last Post: 10-30-2007, 07:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •