01.03 · Lesson
Scheduling Algorithms
Scheduling (Preemptive vs Non-Preemptive)
Types of CPU scheduling:
- Preemptive Scheduling: The CPU is allocated to the processes for a limited time. If a process with higher priority arrives, the currently running process is interrupted and moved to the ready queue.
- Non-Preemptive Scheduling: Once the CPU has been allocated to a process, the process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state.
CPU Scheduling Algorithms
Algorithms used to allocate CPU time to processes in the ready queue:
- First Come First Serve (FCFS) : Simplest scheduling algorithm that schedules according to arrival times of processes.
- Shortest Job First (SJF): Processes which have the shortest burst time are scheduled first.
- Shortest Remaining Time First (SRTF): It is a preemptive mode of SJF algorithm in which jobs are scheduled according to the shortest remaining time.
- Round Robin (RR) Scheduling: Each process is assigned a fixed time, in a cyclic way.
- Priority Based scheduling (Non Preemptive): Processes are scheduled according to their priorities. If priorities match, then scheduling is according to the arrival time.
- Highest Response Ratio Next (HRRN): In this scheduling, processes with the highest response ratio are scheduled. This algorithm avoids starvation. Response Ratio = (Waiting Time + Burst time) / Burst time.
- Multilevel Queue Scheduling (MLQ): Processes are placed in different queues according to priority. Lower level queued processes are scheduled only after completion of processes from the top level queue.
- Multilevel Feedback Queue (MLFQ) Scheduling: It allows the process to move in between queues based on the characteristics of their CPU bursts.
Item 3 of 28 · updated 2026-10-12