In non preemptive scheduling we allow the current process to finish its CPU burst time.
2.) In preemptive scheduling the process is forcibly sent to waiting state when a process with higher priority comes to CPU, In non preeemptive scheduling the process at running state can not be forced to leave the CPU until it completes
Non-Preemptive: Non-preemptive algorithms are designed so that once a process enters the running state(is allowed a process), it is not removed from the processor until it has completed its service time ( or it explicitly yields the processor). context_switch() is called only when the process terminates or blocks.
Preemptive: Preemptive algorithms are driven by the notion of prioritized computation. The process with the highest priority should always be the one currently using the processor. If a process is currently using the processor and a new process with a higher priority enters the ready list, the process on the processor should be removed and returned to the ready list ,until it is once again the highest-priority process in the system
Preemptive: Preemptive algorithms are driven by the notion of prioritized computation. The process with the highest priority should always be the one currently using the processor. If a process is currently using the processor and a new process with a higher priority enters the ready list, the process on the processor should be removed and returned to the ready list ,until it is once again the highest-priority process in the system
No comments:
Post a Comment