Difference between FCFS, Round Robin, SJF and SRT Scheduling

By | September 22, 2021

Difference between First-Come First-Served Scheduling (FCFS), Round Robin (RR) Scheduling, Shortest Job First Scheduling (SJF), SRT

First-Come First-Served Scheduling (FCFS)

  • First-Come First-Served Scheduling (FCFS) is simplest and the most straight forward of all scheduling algorithms.
  • In this scheduling, the process that requests the CPU first is allocated the CPU first. Thus the name first come first served.
  • When CPU is free, it is allocated to the process at the head of ready queue. The running process is then removed from the queue.
  • FCFS scheduling algorithm is non-preemptive. Once the CPU is allocated to a process that process keeps the CPU until it releases the CPU, either by terminating or by requesting I/O.

FCFS Scheduling

Shortest Job First Scheduling (SJF)

  • SJF is also known as Shortest-Job-Next (SJN) algorithm and is faster than FCFS.
  • In SJF, the process with the least estimated execution time selected from the ready queue for execution. 
  • If two processes have the same length of next CPU burst. FCFS scheduling algorithm used to break the tie.
  • SJF algorithm can be preemptive or non-preemptive.

Round Robin Scheduling – CPU Scheduling

  • Round robin scheduling is similar to FCFS tut preemption in added to switch between processes.
  • In RR scheduling, processes dispatched in FIFO but are given a small amount of CPU time. This small amount of time known as time quantum or time slice. A time quantum is generally from 10 to 100 milliseconds.

Round Robin Scheduling - CPU Scheduling

  • The preempted process in then placed at the tail of the ready queue.
  • If a process is completed before its time slice expires, the process itself releases the CPU. The scheduler then proceeds to the next process in ready queue.
  • Round-robin scheduling is effective in timesharing environments in which the system needs to guarantee reasonable response time for interactive users.

Difference between FCFS, Round Robin, SJF and SRT Scheduling

Difference between FCFS, Round Robin, SJF and SRT Scheduling

Factor First-Come First-Served Scheduling (FCFS) Round Robin (RR) Scheduling Shortest Job First Scheduling (SJF) SRT
Scheduling
Definition Process that requests CPU first is allocated the CPU first. Process are allocated CPU turn by turn one after the other.  Shortest Process i.e. with least burst time gets CPU first. Process with smallest estimated runtime completion gets CPU first.
Decision mode Non-preemptive   Preemptive (at time quantum) Non preemptive Non preemptive
Throughput Not emphasized May be low if quantum is too small. High High
 Response time May be high, especially if there is a large variance in process execution times.   Provides good response time for short processes. Provides good response time for short processes. It  provides good response time.
Overhead Minimum Minimum Can be high Can be high
Affect on processes Penalizes short processes; penalizes I/O bound processes. Fair treatment. Penalizes long processes. Penalizes long processes.
Starvation No No Possible Possible
Suitability Useful for batch processing system. It is useful for timesharing system.  Useful in timesharing system.  Useful in timesharing system.