Tag: thread-scheduling

What is difference between pre-emptive scheduling and non-pre-emptive scheduling?

Answer: Pre-emptive scheduling: In this scheduling the highest priority thread runs when it has a chance to do so. This means that an executing lower-priority thread must yield the CPU to a thread with a higher priority that is ready to run. Non-pre-emptive Scheduling: This scheduling is based on the order of the threads waiting…

Read the full article

What thread-scheduling algorithm is used in Java?

Answer: There are two algorithms, used for Java thread scheduling. Time sliced based scheduling algorithm, also known as Round-Robine algorithm. Pre-emptive scheduling.   Read difference between preemptive and non preemptive scheduling   Java uses different scheduling algorithm on different platforms e.g. On Mac – time-sliced On Solaries – pre-emptive On Windows- pre-emptive before JDK-1.0.2, after…

Read the full article