0
377views
Explain the different pre-emptive scheduling policies with suitable examples.
1 Answer
0
1views

The different pre-emptive scheduling policies are as discussed below:

Fixed Priority based pre-emption:

In this case a task with higher priority can pre-empt or suspend a lower priority task and use the system resources for its execution. For example, if a task T1 of lower priority is in execution, and a higher priority task T3 is to be executed; then the lower priority task i.e. T1 will be suspended and the higher priority task i.e. T3 will be executed first.  The figure below shows one such example.

Shortest Job First based pre-emptive scheduling:

In this case a task with lesser execution time can pre-empt or suspend a task with more execution time and use the system resources for its execution. For example, if a task T1 requires a large time for execution and it is in execution, and a task T3 with lower execution time is to be executed; then the task  T1 will be suspended and the task T3 will be executed first. The figure below shows one such example.

Please log in to add an answer.