---
title: "What are Process scheduling algorithms in the Operating System?"  
description: "What are Process scheduling algorithms in the Operating System?"  
author: "Revati S Misra"  
published: 2023-03-27  
updated: 2023-03-27  
canonical: https://www.mindstick.com/forum/157591/what-are-process-scheduling-algorithms-in-the-operating-system  
category: "Operating System"  
tags: ["windows", "operating system"]  
reading_time: 3 minutes  

---

# What are Process scheduling algorithms in the Operating System?

What are [Process](https://yourviews.mindstick.com/story/1525/7-important-factors-that-may-affect-the-learning-process) [scheduling](https://www.mindstick.com/forum/157665/explain-the-round-robin-scheduling-algorithm-with-an-example-in-os) [algorithms](https://www.mindstick.com/articles/12297/google-algorithms-why-so-important) in the [Operating System](https://www.mindstick.com/articles/229069/operating-system-development)?

## Replies

### Reply by Krishnapriya Rajeev

A *process* is a program in execution.

*Process scheduling algorithms* are a set of techniques used by operating systems to determine which processes should run and in what order. These algorithms are responsible for scheduling processes on the CPU, balancing the workload between processes, and ensuring that each process gets a fair amount of CPU time.

Some most commonly used process scheduling algorithms are:

1. First Come First Serve (FCFS): In FCFS, the *first process* that arrives is given the first chance to be executed, followed by the second process, and so on. The executing process continues until it finishes or is interrupted by an I/O operation. It is **non-preemptive** in nature. Its main limitation is that it does not consider the length of a process, which can lead to long waiting times for processes with longer execution times.
2. Shortest Job First (SJF): In SJF, the process with the *shortest estimated CPU burst time* is executed first. Once a process starts executing, it continues until it completes or is blocked by an I/O operation. It minimizes the average waiting time for all processes, as shorter jobs are executed first, allowing other processes to start executing sooner. However, it can lead to starvation for longer processes if they keep arriving after shorter processes. There are two types of SJF: **non-preemptive and preemptive**. Non-preemptive SJF means that once a process starts executing, it cannot be interrupted until it completes or is blocked by I/O. Preemptive SJF means that a shorter job can interrupt a currently executing longer job.
3. Priority Scheduling: In priority scheduling, each process is assigned a *priority value*, which determines the order in which processes are executed. The process with the highest priority value is executed first, followed by the process with the next highest priority value, and so on. Once a process starts executing, it continues until it completes or is blocked by an I/O operation. Priority scheduling is either **preemptive or non-preemptive**. Preemptive priority scheduling means that a higher-priority process can interrupt a currently executing lower-priority process. Non-preemptive priority scheduling means that a process keeps executing until it completes or is blocked by I/O, regardless of the priority of other processes. It can also lead to the starvation of lower-priority processes if higher-priority processes keep arriving.
4. Round Robin (RR): In Round Robin scheduling, each process is given a *fixed time slice or quantum of CPU time*. The processes are executed in a cyclic order, with each process executing for one time quantum before being preempted and the next process in the queue executing. The time quantum can be fixed or vary dynamically depending on the [system](https://www.mindstick.com/articles/23411/the-most-effective-method-to-find-the-perfect-small-business-phone-system-for-your-business) load and other factors. It is **preemptive** in nature, therefore, each process is interrupted after its time quantum, even if it has not finished executing. The interrupted process is put back into the queue and gets another chance to execute when its turn comes up again. It is a very efficient algorithm for time-sharing system where each process needs a fair amount of CPU time. However, it causes increased overhead due to context switching.


---

Original Source: https://www.mindstick.com/forum/157591/what-are-process-scheduling-algorithms-in-the-operating-system

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
