Tasks are usually assigned with priorities. At times it is necessary
to run a certain task that has a higher priority before another task although
it is running. Therefore, the running task is interrupted for some time and
resumed later when the priority task has finished its execution. This is called
In non-preemptive scheduling, a running task is executed till completion. It
cannot be interrupted.