Non preemptive scheduling algorithm: In a non preemptive scheduling algorithm, a process is not blocked by the scheduler.
Preemptive scheduling algorithm: In a preemptive scheduling algorithm, a process is blocked by the scheduler after a fixed time.
Purpose of a scheduling algorithm for any system:
1) A scheduling algorithm should provide fair CPU share time to every process.
2) It should make sure that there should be optimum use of all the resources.
3) It should make sure that system policies are enforced effectively.
Purpose of a scheduling algorithm for batch system:
1) Throughput of the system should be maximum. Throughput can be defined as number of tasks finished in one hour.
2) Turnaround time should be minimized. Turnaround time is the average time from which a task is submitted to a task has completed.
Purpose of a scheduling algorithm for real time system:
1) Deadlines should always be met.
2) Scheduling should be consistent and in order.
Purpose of a scheduling algorithm for interactive system:
1) Response time should be minimized. Response time is the time between sending a command and getting the output.
2) Tasks should be performed in a proportionate manner and user expectations should be met.