9.7.25

Preemptive and Non Preemptive schedulers

Preemptive and Non-Preemptive Schedulers

Preemptive Scheduling

  • The operating system can interrupt a process and switch to another process.
  • The scheduler can preempt a process at any time.
  • Advantages:
    • Improved responsiveness.
    • Better support for interactive processes.
  • Disadvantages:
    • Increased overhead due to context switching.
    • Potential for starvation if not implemented correctly.

Non-Preemptive Scheduling

  • A process runs until it completes or is blocked.
  • The scheduler cannot interrupt a process.
  • Advantages:
    • Less overhead due to context switching.
    • Simpler implementation.
  • Disadvantages:
    • Poor responsiveness.
    • Potential for long processes to monopolize the CPU.

Comparison

Criteria Preemptive Non-Preemptive
Interruptibility Yes No
Responsiveness Better Poor
Overhead Higher Lower
Complexity More complex Simpler

No comments:

Post a Comment

Difference between File and Folder

10 Differences Between Files and Folders Definition: File: A collection of data or information stored on a computer. ...