What is the scheduling algorithm used in the JVM?

China
August 9, 2008 8:56am CST
I use Java language to develop software. I don't know exactly which scheduling algorithm used in the JVM. Is it a scheduling based on priority and preemptive, or a kind of round-robin?
3 people like this
3 responses
@mr_mlk (364)
9 Aug 08
Thread scheduling? I am fairly sure that is passed directly to the OS. Each Java thread is a native thread. Now the best place to double check this would be the VM specs, the opening paragraph (to me) confirms the above. http://java.sun.com/docs/books/jvms/second_edition/html/Concepts.doc.html#33308
• China
10 Aug 08
Oh, I see. Thank you so much.
• China
11 Aug 08
For synchronization between JAVA thread, can we use something like semaphore?
@mr_mlk (364)
11 Aug 08
Thread.join, java.util.concurrent.locks.Lock and the synchronize keyword.
@53kugua (15)
• China
19 Aug 08
The thread scheduling algorithm are different between one JVM and another,so that it is possible to accurately predict when one thread will be executed over another
@joyadalia (1408)
• Philippines
10 Aug 08
Have you tried checking with customer support?