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


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 for a CPU. Higher priority threads will not force a lower priority thread to relinquish the CPU.