AfterAcademy Tech
•
12 Nov 2019

In the Operating System, the process scheduling algorithms can be divided into two broad categories i.e. Preemptive Scheduling and Non-Preemptive Scheduling. In this blog, we will learn the difference between these two. So, let's get started.
In preemptive scheduling, the CPU will execute a process but for a limited period of time and after that, the process has to wait for its next turn i.e. in preemptive scheduling, the state of a process gets changed i.e. the process may go to the ready state from running state or from the waiting state to the ready state. The resources are allocated to the process for a limited amount of time and after that, they are taken back and the process goes to the ready queue if it still has some CPU burst time remaining. Some of the preemptive scheduling algorithms are Round-robin, SJF (preemptive), etc.
In non-preemptive scheduling, if some resource is allocated to a process then that resource will not be taken back until the completion of the process. Other processes that are present in the ready queue have to wait for its turn and it cann't forcefully get the CPU. Once the CPU is allocated to a process, then it will be held by that process until it completes its execution or it goes in the waiting state for I/O operation.
That's it for this blog. Hope you learned something new today. You can learn about "Various process scheduling algorithms in OS" from here.
Do share this blog with your friends to spread the knowledge. Visit our YouTube channel for more content. You can read more blogs from here.
Keep Learning 🙂
Team AfterAcademy!
AfterAcademy Tech
In this blog, we will learn about Dispatchers in Operating System and we will also learn the difference between a Scheduler and a Dispatcher.

AfterAcademy Tech
In this blog, we will learn the difference between SQL and MySQL. People use these terms intechangeably. But both are having different meanings.

AfterAcademy Tech
In this blog, we will learn what is RDBMS and how it is different from DBMS. People often use these words intechangeably. But there is a difference between these two terms. So, let's learn how.

AfterAcademy Tech
In this blog, we will learn how WHERE and HAVING clause are used and then see what are the main differences between the WHERE clause and HAVING clause.
