- Trending Categories
- Data Structure
- Operating System
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Preemptive and Non-Preemptive Scheduling in OS
In this post, we will understand the difference between pre-emptive and non-pre-emptive scheduling in operating system −
In this type of scheduling, the resources (CPU Cycle) have been allocated to a process for a limited amount of time.
A process can be interrupted when it is being executed.
If a process that has a high priority arrives frequently in the ‘ready’ queue, the low priority processes may starve.
This kind of scheduling has overheads since it has to schedule multiple processes.
It is flexible in nature.
It is expensive in nature.
The CPU utilization is high in this type of scheduling.
Examples of pre-emptive scheduling include: Round Robin scheduling, Shortest Remaining Time First scheduling.
In this type of scheduling, once the resources (CPU Cycle) have been allocated to a process, the process holds it until it completes its burst time or switches to the ‘wait’ state.
A process can’t be interrupted until it terminates itself or its time is over.
If a process that has a long burst time is running the CPU, then the process that has less CPU burst time would starve.
It doesn’t have overhead.
It is not flexible in nature.
It is not expensive in nature.
Examples of non-pre-emptive scheduling include: First Come First Serve and Shortest Job First.
- Preemptive and Non-Preemptive Scheduling
- C++ Program for Shortest Job First (SJF) scheduling(non-preemptive)
- C++ Program for Shortest Job First (SJF) scheduling(preemptive)
- Difference between Network OS and Distributed OS
- Difference Between Paging and Swapping in OS
- Difference Between Deadlock and Starvation in OS
- Difference Between Semaphore and Monitor in OS
- Difference Between Multitasking and Multithreading in OS
- Difference Between Buffering and Caching in OS
- Difference Between Interrupt and Polling in OS
- Difference Between Paging and Segmentation in OS
- Difference Between Spooling and Buffering in OS
- Difference Between Virtual and Cache Memory in OS
- Difference Between Long-Term and Short-Term Scheduler in OS
- Difference between Metals and Non-Metals