
- OS - Home
- OS - Needs
- OS - Overview
- OS - History
- OS - Components
- OS - Structure
- OS - Architecture
- OS - Services
- OS - Properties
- OS - TAT & WAT
- OS Processes
- OS - Processes
- OS - Process Scheduling
- OS - Scheduling Algorithms
- FCFS Scheduling Algorithm
- SJF Scheduling Algorithm
- Round Robin Scheduling Algorithms
- HRRN Scheduling Algorithms
- Priority Scheduling Algorithms
- Multilevel Queue Scheduling
- Context Switching
- Operations on Processes
- Lottery Process Scheduling
- Predicting Burst Time SJF Scheduling
- Race Condition Vulnerability
- Critical Section Synchronization
- Mutual Exclusion Synchronization
- Process Control Block
- Inter Process Communication
- Preemptive and Non-Preemptive Scheduling
- Operating System - Deadlock
- Introduction to Deadlock in Operating System
- Conditions for Deadlock in Operating System
- OS Synchronization
- Operating System - Process Synchronization
- Operating System - Critical Section
- Operating System - Semaphores
- Operating System - Counting Semaphores
- Operating System - Mutex
- Operating System - Lock Variable in Process Synchronization
- Operating System - Turn Variable in Process Synchronization
- Operating System - Bounded Buffer Problem
- Operating System - Reader Writer Locks in Process Synchronization
- Operating System - Test Set Lock in Process Synchronization
- Operating System - Peterson Solution in Process Synchronization
- Operating System - Monitors in Process Synchronization
- Operating System - Sleep and Wake in Process Synchronization
- OS Memory Management
- OS - Memory Management
- OS - Virtual Memory
- OS Storage Management
- File Systems in Operating System
- Linked Index Allocation in Operating System
- Indexed Allocation in Operating System
- Structures of Directory in Operating System
- File Attributes in Operating System
- Operating System - Page Replacement
- Operating Systems - Thrashing
- Belady’s Anomaly in Page Replacement Algorithms
- Optimal Page Replacement Algorithm
- Operating System - Types
- Types of Operating System
- Batch Processing Operating System
- Multiprocessing Operating System
- Hybrid Operating System
- Monolithic Operating System
- Zephyr Operating System
- Nix Operating System
- Blackberry Operating System
- Garuda Operating System
- Tails Operating System
- Clustered Operating System
- Haiku Operating System
- AIX Operating System
- Solus Operating system
- Tizen Operating System
- Bharat Operating System
- Fire Operating System
- Bliss Operating System
- VxWorks Operating System
- Embedded Operating System
- Single User Operating System
- OS Miscellaneous
- OS - Multi-threading
- OS - I/O Hardware
- OS - I/O Software
- OS - Security
- OS - Linux
- OS Useful Resources
- OS - Quick Guide
- OS - Useful Resources
- OS - Discussion
Preemptive and Non-Preemptive Scheduling
In multiprogramming environments, process scheduling is performed by the CPU to decide the next process to be executed. This allows multiple CPU processes to exist simultaneously while optimizing utilization of system resources as well as the time of execution. A scheduling strategy defines a procedure to select one process among the processes waiting at the ready queue for execution.
Categories of Process Scheduling
Process scheduling algorithms are broadly classified as Preemptive Scheduling and Non-preemptive Scheduling. The different types of preemptive and non-preemptive scheduling algorithms are represented in the following diagram −

Non-preemptive Scheduling
Non-preemptive scheduling algorithms refer to the class of CPU scheduling technique where once a process is allocated the CPU, it holds the CPU till the process gets terminated or is pushed to the waiting state. No process is interrupted until it runs to completion. The scheduler allocates another process to the CPU only after the currently allocated process terminates and relinquishes control on the CPU.
Example of Non-preemptive Scheduling
- First-Come-First-Serve (FCFS) Scheduling
- Shortest Job First (SJF) Scheduling
- Priority Non-preemptive Scheduling
- Highest Response Ratio Next (HRRN) Scheduling
Advantages of Non-preemptive Scheduling
- Non-preemptive scheduling methods are simpler to design and implement.
- These techniques need lesser resources and have lower overhead.
- They require lesser number of context switches. So, the amount of time expended for scheduling is very less in comparison to execution of the processes.
- They are deterministic in nature and the scheduling outputs are easily predictable.
Disadvantages of Non-preemptive Scheduling
- Non-preemptive scheduling cannot respond to dynamically changing system.
- It may result in deadlock if there are processes in the system which are holding some resources which waiting for other resources that are held by other processes.
- If the executing process erroneously enter infinite loop, it may cause system crash since no other process can interrupt the execution.
Preemptive Scheduling
Preemptive scheduling algorithms fall under the category of process scheduling technique in which a running process can be interrupted by another process and sent to the ready queue even when it has not completed its entire execution in CPU.
An executing process may be pre-empted under the following situations −
- The first scenario is when the process has reached the limit of the time slot allotted to it. If the burst time of the process is greater than CPU cycle, it is placed back into the ready queue and will execute in the next chance.
- The second scenario is when a higher priority process enters the system. The process state of the executing process is saved in the process table and the higher priority process starts to execute.
- Another scenario is when a short process enters the system which uses Shortest Remaining Time Next scheduling algorithm. If a longer process is executing, it is pre-empted out to let the shorter process execute.
Example of Preemptive Scheduling
- Round Robin (RR) Scheduling
- Shortest Remaining Time Next (SJF Preemptive)
- Priority Preemptive Scheduling
Advantages of Preemptive Scheduling
- No process can monopolize the CPU.
- Fair scheduling can be applied.
- Preemptive scheduling improves the average response time.
- They allow reconsideration of scheduling decision after each pre-emption, thus making the scheduling decision more adaptive to change.
- Deadlocks can be avoided by preempting processes.
Disadvantages of Preemptive Scheduling
- Preemptive scheduling require frequent context switching which is time-consuming.
- This requires more memory since all context information for each process needs to be stored and updated frequently.
- Often a low priority process or a long process has to wait for long time due to influx of many higher priority or shorter processes in the system.
- The processes must be appropriately coded so that they can be switched at all times without information loss. This leads to complex processes.
Difference Between Preemptive and Non-Preemptive Scheduling
The following table lists the key differences between preemptive and Non-pScheduling −
Preemptive Scheduling | Non-Preemptive Scheduling |
---|---|
Resources are allocated according to the cycles for a limited time. | Resources are used and then held by the process until it gets terminated. |
The process can be interrupted, even before the completion. | The process is not interrupted until its life cycle is complete. |
Starvation may be caused, due to the insertion of priority process in the queue. | Starvation can occur when a process with large burst time occupies the system. |
Maintaining queue and remaining time needs storage overhead. | No such overheads are required. |
Fair scheduling can be applied where all the processes can get equal chance for CPU access | A process may monopolize the CPU. |
Deadlocks can be easily avoided. | Deadlocks may occur. |