October 16, 2010 at 2:46 PM
Java uses fixed-priority scheduling algorithms to decide which thread to execute. The Java run-time environment supports a very simple, deterministic algorithm called fixed-priority scheduling. This algorithm schedules threads on the basis of their priority relative to other Runnable threads. The thread with the highest priority runs first if another thread with a higher priority is started, Java makes the lower priority thread wait if more than one thread exists with the same priority, Java quickly switches between them in round-robin fashion BUT only if the operating system uses time-slicing.