Define the difference between preemptive and non-preemptive scheduling.
| Feature | Preemptive Scheduling | Non-Preemptive Scheduling |
|---|---|---|
| CPU allocation | Can be interrupted at any time | Runs until completion or voluntarily yields CPU |
| Priority | Higher priority processes can interrupt lower priority processes | No priority levels for processes |
| Responsiveness | Processes can be responsive to system events and changes | Processes may not be able to respond quickly to system events |
| Resource Utilization | Less efficient, as there is overhead in context switching | More efficient, as there is less overhead in context switching |
| Complexity | More complex, requires more management by the operating system | Less complex, easier to manage by the operating system |
| Examples | Real-time operating systems, multitasking environments | Single-tasking environments, older operating systems |