Preemptive and Non-Preemptive Scheduling - GeeksforGeeks
Preemptive and Non-Preemptive Scheduling - GeeksforGeeks
Preemptive and Non-Preemptive Scheduling - GeeksforGeeks
1. Preemptive Scheduling :
Preemptive scheduling is used when a process switches from running state to ready state
or from waiting state to ready state. The resources (mainly CPU cycles) are allocated to
the process for the limited amount of time and then is taken away, and the process is
again placed back in the ready queue if that process still has CPU burst time remaining.
That process stays in ready queue till it gets next chance to execute.
Algorithms based on preemptive scheduling are: Round Robin (RR),Shor test Remaining
2. Non-Preemptive Scheduling :
https://www.geeksforgeeks.org/preemptive-and-non-preemptive-scheduling/ 1/7
8/11/2021 Preemptive and Non-Preemptive Scheduling - GeeksforGeeks
allocated to a process, the process holds the CPU till it gets terminated or it reaches a
waiting state. In case of non-preemptive scheduling does not interrupt a process running
CPU in middle of the execution. Instead, it waits till the process complete its CPU burst
Ad
Algorithms based on non-preemptive scheduling are: Shor test Job First (S JF basically
1. In preemptive scheduling the CPU is allocated to the processes for the limited time
We use cookies to ensure you have the best browsing experience on our website. By using our Got It !
terminates or switches to waiting state.
site, you
acknowledge that you have read and understood our
Cookie
▲ Policy &
Privacy Policy
https://www.geeksforgeeks.org/preemptive-and-non-preemptive-scheduling/ 2/7
8/11/2021 Preemptive and Non-Preemptive Scheduling - GeeksforGeeks
execution when higher priority one comes whereas, the executing process in non-
preemptive scheduling is not interrupted in the middle of execution and wait till its
execution.
3. In Preemptive Scheduling, there is the overhead of switching the process from ready
state to running state, vise-verse, and maintaining the ready queue. Whereas in case
queue then the process with low priority has to wait for a long, and it may have to
star ve. On the other hands, in the non-preemptive scheduling, if CPU is allocated to
the process having larger burst time then the processes with small burst time may
5. Preemptive scheduling attain flexible by allowing the critical processes to access CPU
as they arrive into the ready queue, no matter what process is executing currently.
Non-preemptive scheduling is called rigid as even if a critical process enters the ready
6. The Preemptive Scheduling has to maintain the integrity of shared data that ’s why it is
waiting state.
Star vation If a process having high If a process with long burst time is
Related Articles priority frequently arrives in running CPU, then later coming process
the ready queue, low priority with less CPU burst time may star ve.
We use cookies to ensure you have the best browsing experience on our website. By using our Got It !
site, you
acknowledgeprocess may star ve.
that you have read and understood our
Cookie
▲ Policy &
Privacy Policy
https://www.geeksforgeeks.org/preemptive-and-non-preemptive-scheduling/ 3/7
8/11/2021 Preemptive and Non-Preemptive Scheduling - GeeksforGeeks
the processes.
scheduling are Round Robin are First Come First Ser ve and Shor test
First.
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual
exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.
Like 0
Previous Next
We use cookies to ensure you have the best browsing experience on our website. By using our Got It !
RECOMMENDED ARTICLES
site, you
acknowledge that you have read and understood our
Cookie
▲ Policy &
Privacy Policy Page : 1 2 3
https://www.geeksforgeeks.org/preemptive-and-non-preemptive-scheduling/ 4/7
8/11/2021 Preemptive and Non-Preemptive Scheduling - GeeksforGeeks
20, Apr 20
01, Apr 20
01, Feb 21
Ar ticle Contributed By :
Ankit_Bisht
@Ankit_Bisht
Current difficulty :
Easy
https://www.geeksforgeeks.org/preemptive-and-non-preemptive-scheduling/ 5/7
8/11/2021 Preemptive and Non-Preemptive Scheduling - GeeksforGeeks
Load Comments
Company Learn
About Us Algorithms
Careers Data Structures
Privacy Policy Languages
Contact Us CS
Subjects
Copyright Policy Video Tutorials
Practice Contribute
Courses Write an Article
Company-wise Write Interview
Experience
Topic-wise Internships
How to begin? Videos
We use cookies to ensure you have the best browsing experience on our website. By using our Got It !
site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
@geeksforgeeks
, Some rights reserved
▲
https://www.geeksforgeeks.org/preemptive-and-non-preemptive-scheduling/ 6/7
8/11/2021 Preemptive and Non-Preemptive Scheduling - GeeksforGeeks
https://www.geeksforgeeks.org/preemptive-and-non-preemptive-scheduling/ 7/7