CS Electrical And Electronics
@cselectricalandelectronics

Preemptive and non preemptive in os

All QuestionsCategory: Operating SystemPreemptive and non preemptive in os
Anonymous asked 1 year ago
1 Answers
Anonymous answered 1 year ago

In a preemptive operating system, the scheduler has the ability to interrupt a running task or process and preemptively allocate resources to another task or process. This allows the scheduler to prioritize certain tasks or processes and ensure that they are given the resources they need to run in a timely manner.
In contrast, a non-preemptive operating system does not have the ability to interrupt a running task or process. In this case, a task or process will continue to run until it has completed or until it releases the resources it is using, at which point the scheduler can allocate the resources to another task or process.
Both preemptive and non-preemptive scheduling algorithms have their advantages and disadvantages. Preemptive scheduling allows the operating system to respond quickly to changes in resource needs and prioritize certain tasks or processes, but it can also lead to decreased predictability and potentially lower overall system performance. Non-preemptive scheduling, on the other hand, may provide more predictable and consistent performance, but it may also lead to delays in the execution of certain tasks or processes if resources are not released in a timely manner.