Process scheduling is a crucial component of multiprogramming operating systems. It involves managing the execution of multiple processes on a system with a single central processing unit (CPU). The goal is to optimize CPU usage, minimize wait times, and ensure fairness among processes.
First Come First Serve (FCFS): is a basic scheduling algorithm where tasks are executed in the order of their arrival. Simple and easy to implement, it prioritizes fairness but may lead to inefficiencies. FCFS is commonly used in various systems and networks for its straightforward approach.
Shortest Job FirstShortest Job First (SJF): A scheduling algorithm where the process with the smallest execution time is selected for execution next. It minimizes the average waiting time and turnaround time, ideal for scenarios with varied task lengths.
Shortest Remaining Time FirstShortest Remaining Time First (SRTF): A preemptive variant of SJF where the currently executing process can be interrupted if a new process with a shorter execution time arrives. It ensures minimal waiting time by constantly prioritizing the shortest remaining task.
Priority (Preemptive)Priority Scheduling (Preemptive): Each process is assigned a priority, and the highest priority process is executed next. Higher priority tasks can preempt lower ones.
Priority (Non-Preemptive)Priority Scheduling (Non-Preemptive): Similar to preemptive priority scheduling but completes the currently executing task before considering others of equal or lower priority, without interruption.
Round RobinRound Robin: Allocates CPU time to tasks in fixed time slices, ensuring fairness and preventing starvation, commonly used in time-sharing systems.