0
1.6kviews
Describe the difference between pre-emptive and non-pre-emptive scheduling algorithms. Which one is more suitable for a time-sharing system? Justify.
1 Answer
0
33views

Solution:

Difference between preemptive and non-preemptive scheduling:

Basic comparition preemptive scheduling non-preemptive scheduling
Basic In preemptive, resource are allotted to a process for a limited time. in Non-preemptive, Once resources (CPU Cycles) are allotted to a process, it is held until the burst time is completed or the process transitions to the waiting state.
CPU Utilization CPU utilization is more compared to Non-Preemptive Scheduling. CPU consumption is low in Non-preemptive scheduling.
Starvation If a high priority process frequently arrives in the ready queue, low priority process may starve. If a process with long burst time is running CPU, then another process with less CPU burst time may starve.
Interrupt The process can be interrupted at all time. In case, a process cannot be interrupted until it has been completed or the timer has expired.
Overhead Preemptive scheduling has overheads of scheduling the processes. There are no overheads in Non-preemptive scheduling.
Flexibility Preemptive scheduling is flexible. Non-preemptive scheduling is rigid.
Examples Some of the preemptive scheduling is SRTF, Priority, Round Robin, etc. Some of the non-preemptive scheduling is FCFS, Priority, etc.

Which one is more suitable for a time-sharing system?

  • A preemptive scheduling is most suitable for a time - sharing system.

  • A round robin scheduler is one particular type of scheduling strategy that could be used in a time sharing computer.

  • Round robin is the preemptive process scheduling algorithm.

  • Each process is provided a fix time to execute, it is called a quantum. Once a process is executed for a given time period, it is preempted and other process executes for a given time period.

enter image description here

  • Round-robin scheduling is simple, easy to implement, and starvation-free. Round-robin scheduling can also be applied to other scheduling problems, such as data packet scheduling in computer networks.
Please log in to add an answer.