Scheduling_Algorithms
Scheduling_Algorithms
Operating Systems
Overview of Scheduling Algorithms
with Examples and Steps
First Come First Serve (FCFS)
• 1. Sort processes by arrival time.
• 2. Calculate Completion Time (CT).
• 3. Compute Turnaround Time (TAT = CT - AT).
• 4. Compute Waiting Time (WT = TAT - BT).
Shortest Job First (SJF)
• 1. Sort by Arrival Time.
• 2. Choose shortest Burst Time first.
• 3. Compute Completion Time (CT).
• 4. Compute Turnaround Time (TAT = CT - AT).
• 5. Compute Waiting Time (WT = TAT - BT).
Round Robin (RR)
• 1. Sort processes by Arrival Time.
• 2. Allocate CPU for a time slice (quantum).
• 3. If process not finished, move to end of
queue.
• 4. Repeat until all processes complete.
Priority Scheduling
• 1. Sort by priority (lower number = higher
priority).
• 2. Execute higher priority process first.
• 3. Compute Completion Time (CT).
• 4. Compute Turnaround Time (TAT = CT - AT).
• 5. Compute Waiting Time (WT = TAT - BT).