Preemptive Scheduling is a CPU scheduling technique that works by dividing time slots of CPU to a given process. The time slot given might be able to complete the whole process or might not be able to it. When 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. This scheduling is used when the process switch to ready state.
Algorithms that are backed by preemptive Scheduling are round-robin (RR), priority, SRTF (shortest remaining time first).
Non-preemptive Scheduling is a CPU scheduling technique the process takes the resource (CPU time) and holds it till the process gets terminated or is pushed to the waiting state. No process is interrupted until it is completed, and after that processor switches to another process.
ALSO READ
Operating System Study materials
Operating System Technigoo Publication Book
Algorithms that are based on non-preemptive Scheduling are a non-preemptive priority, and the shortest Job first.
Preemptive Vs Non-Preemptive Scheduling
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 a priority process in the queue. | Starvation can occur when a process with a large burst time occupies the system. |
Maintaining queue and remaining time needs storage overhead. | No such overheads are required. |
Related Questions & Answers
- What are the Process States in Operating System?
- Write about Process Control Block.
- Write Various Operating System Services.
- What is the requirement to solve the Critical Section Problem?
- Write about the Priority Inversion Problem.
- Write various multithreading models.
- Discuss preemptive scheduling.
- Consider the following set of processes........
- Write about Semaphores. Explain its properties along with drawbacks.
- Write necessary conditions for arise of Deadlock.
- Define the following Terms: Mutual Exclusion, Thrashing, Thread
- Explain the features of Time sharing system.
- What is an operating system? Give the view of OS as a resource manager.
- Explain the following UNIX Commands: (a) grep (b) chmod (c) finger (d) cat (e) sort
- What is the thread? Explain thread Structure? And explain any one type of thread in detail.
- What is PCB? Discuss its major fields.
- List the four events that cause processes to be created. Explain each in brief.
- Explain the producer-consumer problem and its solution using the monitor.
- List Deadlock recovery techniques and explain any one of them.
- Write a short note in Critical Section.
- Explain context switching.
- Differentiate between Multi-Programming and Multi-Processing System.
- Write different types of system calls?
- What is a scheduler? Explain queuing diagram representation of process scheduler.
- Define the following Terms: Throughput, Waiting Time, Turnaround Time, Response Time.
- What is deadlock? List the conditions that lead to deadlock.
- Explain Banker’s algorithm for multiple resources with examples.
- What is Semaphore? Give the implementation of Bounded Buffer.
- What is Mutex? Write pseudocode to achieve mutual exclusion using Mutex.
- Explain the IPC problem. Explain the Dining Philosopher problem.