Basic to Advanced Numerical Questions for Scheduling Algorithms
First Come First Serve (FCFS)
Problem 1: Given the following processes:
P1 - Arrival Time: 9, Burst Time: 3
P2 - Arrival Time: 0, Burst Time: 10
P3 - Arrival Time: 8, Burst Time: 1
P4 - Arrival Time: 8, Burst Time: 8
P5 - Arrival Time: 10, Burst Time: 2
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Problem 2: Given the following processes:
P1 - Arrival Time: 10, Burst Time: 10
P2 - Arrival Time: 7, Burst Time: 5
P3 - Arrival Time: 4, Burst Time: 2
P4 - Arrival Time: 2, Burst Time: 6
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Problem 3: Given the following processes:
P1 - Arrival Time: 7, Burst Time: 5
P2 - Arrival Time: 6, Burst Time: 1
P3 - Arrival Time: 0, Burst Time: 9
P4 - Arrival Time: 3, Burst Time: 3
P5 - Arrival Time: 0, Burst Time: 1
P6 - Arrival Time: 9, Burst Time: 5
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Problem 4: Given the following processes:
P1 - Arrival Time: 10, Burst Time: 4
P2 - Arrival Time: 0, Burst Time: 7
P3 - Arrival Time: 0, Burst Time: 3
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Problem 5: Given the following processes:
P1 - Arrival Time: 0, Burst Time: 3
P2 - Arrival Time: 1, Burst Time: 10
P3 - Arrival Time: 3, Burst Time: 6
P4 - Arrival Time: 7, Burst Time: 2
P5 - Arrival Time: 4, Burst Time: 7
P6 - Arrival Time: 5, Burst Time: 10
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Problem 6: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 6, Priority: 4
P2 - Arrival Time: 1, Burst Time: 9, Priority: 4
P3 - Arrival Time: 0, Burst Time: 5, Priority: 2
P4 - Arrival Time: 10, Burst Time: 9, Priority: 4
P5 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Problem 7: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 4
P2 - Arrival Time: 5, Burst Time: 4, Priority: 5
P3 - Arrival Time: 0, Burst Time: 6, Priority: 4
P4 - Arrival Time: 7, Burst Time: 4, Priority: 5
P5 - Arrival Time: 1, Burst Time: 9, Priority: 4
P6 - Arrival Time: 9, Burst Time: 3, Priority: 1
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Problem 8: Given the following processes:
P1 - Arrival Time: 8, Burst Time: 2, Priority: 4
P2 - Arrival Time: 1, Burst Time: 8, Priority: 3
P3 - Arrival Time: 9, Burst Time: 10, Priority: 5
P4 - Arrival Time: 4, Burst Time: 4, Priority: 1
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Problem 9: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 2
P2 - Arrival Time: 10, Burst Time: 6, Priority: 5
P3 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Problem 10: Given the following processes:
P1 - Arrival Time: 4, Burst Time: 7, Priority: 1
P2 - Arrival Time: 8, Burst Time: 7, Priority: 3
P3 - Arrival Time: 10, Burst Time: 10, Priority: 1
P4 - Arrival Time: 7, Burst Time: 2, Priority: 2
Calculate the average waiting time and turnaround time using First Come First Serve (FCFS).
Shortest Job First (SJF)
Problem 1: Given the following processes:
P1 - Arrival Time: 9, Burst Time: 3
P2 - Arrival Time: 0, Burst Time: 10
P3 - Arrival Time: 8, Burst Time: 1
P4 - Arrival Time: 8, Burst Time: 8
P5 - Arrival Time: 10, Burst Time: 2
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Problem 2: Given the following processes:
P1 - Arrival Time: 10, Burst Time: 10
P2 - Arrival Time: 7, Burst Time: 5
P3 - Arrival Time: 4, Burst Time: 2
P4 - Arrival Time: 2, Burst Time: 6
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Problem 3: Given the following processes:
P1 - Arrival Time: 7, Burst Time: 5
P2 - Arrival Time: 6, Burst Time: 1
P3 - Arrival Time: 0, Burst Time: 9
P4 - Arrival Time: 3, Burst Time: 3
P5 - Arrival Time: 0, Burst Time: 1
P6 - Arrival Time: 9, Burst Time: 5
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Problem 4: Given the following processes:
P1 - Arrival Time: 10, Burst Time: 4
P2 - Arrival Time: 0, Burst Time: 7
P3 - Arrival Time: 0, Burst Time: 3
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Problem 5: Given the following processes:
P1 - Arrival Time: 0, Burst Time: 3
P2 - Arrival Time: 1, Burst Time: 10
P3 - Arrival Time: 3, Burst Time: 6
P4 - Arrival Time: 7, Burst Time: 2
P5 - Arrival Time: 4, Burst Time: 7
P6 - Arrival Time: 5, Burst Time: 10
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Problem 6: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 6, Priority: 4
P2 - Arrival Time: 1, Burst Time: 9, Priority: 4
P3 - Arrival Time: 0, Burst Time: 5, Priority: 2
P4 - Arrival Time: 10, Burst Time: 9, Priority: 4
P5 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Problem 7: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 4
P2 - Arrival Time: 5, Burst Time: 4, Priority: 5
P3 - Arrival Time: 0, Burst Time: 6, Priority: 4
P4 - Arrival Time: 7, Burst Time: 4, Priority: 5
P5 - Arrival Time: 1, Burst Time: 9, Priority: 4
P6 - Arrival Time: 9, Burst Time: 3, Priority: 1
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Problem 8: Given the following processes:
P1 - Arrival Time: 8, Burst Time: 2, Priority: 4
P2 - Arrival Time: 1, Burst Time: 8, Priority: 3
P3 - Arrival Time: 9, Burst Time: 10, Priority: 5
P4 - Arrival Time: 4, Burst Time: 4, Priority: 1
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Problem 9: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 2
P2 - Arrival Time: 10, Burst Time: 6, Priority: 5
P3 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Problem 10: Given the following processes:
P1 - Arrival Time: 4, Burst Time: 7, Priority: 1
P2 - Arrival Time: 8, Burst Time: 7, Priority: 3
P3 - Arrival Time: 10, Burst Time: 10, Priority: 1
P4 - Arrival Time: 7, Burst Time: 2, Priority: 2
Calculate the average waiting time and turnaround time using Shortest Job First (SJF).
Shortest Remaining Time Next (SRTN)
Problem 1: Given the following processes:
P1 - Arrival Time: 9, Burst Time: 3
P2 - Arrival Time: 0, Burst Time: 10
P3 - Arrival Time: 8, Burst Time: 1
P4 - Arrival Time: 8, Burst Time: 8
P5 - Arrival Time: 10, Burst Time: 2
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Problem 2: Given the following processes:
P1 - Arrival Time: 10, Burst Time: 10
P2 - Arrival Time: 7, Burst Time: 5
P3 - Arrival Time: 4, Burst Time: 2
P4 - Arrival Time: 2, Burst Time: 6
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Problem 3: Given the following processes:
P1 - Arrival Time: 7, Burst Time: 5
P2 - Arrival Time: 6, Burst Time: 1
P3 - Arrival Time: 0, Burst Time: 9
P4 - Arrival Time: 3, Burst Time: 3
P5 - Arrival Time: 0, Burst Time: 1
P6 - Arrival Time: 9, Burst Time: 5
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Problem 4: Given the following processes:
P1 - Arrival Time: 10, Burst Time: 4
P2 - Arrival Time: 0, Burst Time: 7
P3 - Arrival Time: 0, Burst Time: 3
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Problem 5: Given the following processes:
P1 - Arrival Time: 0, Burst Time: 3
P2 - Arrival Time: 1, Burst Time: 10
P3 - Arrival Time: 3, Burst Time: 6
P4 - Arrival Time: 7, Burst Time: 2
P5 - Arrival Time: 4, Burst Time: 7
P6 - Arrival Time: 5, Burst Time: 10
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Problem 6: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 6, Priority: 4
P2 - Arrival Time: 1, Burst Time: 9, Priority: 4
P3 - Arrival Time: 0, Burst Time: 5, Priority: 2
P4 - Arrival Time: 10, Burst Time: 9, Priority: 4
P5 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Problem 7: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 4
P2 - Arrival Time: 5, Burst Time: 4, Priority: 5
P3 - Arrival Time: 0, Burst Time: 6, Priority: 4
P4 - Arrival Time: 7, Burst Time: 4, Priority: 5
P5 - Arrival Time: 1, Burst Time: 9, Priority: 4
P6 - Arrival Time: 9, Burst Time: 3, Priority: 1
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Problem 8: Given the following processes:
P1 - Arrival Time: 8, Burst Time: 2, Priority: 4
P2 - Arrival Time: 1, Burst Time: 8, Priority: 3
P3 - Arrival Time: 9, Burst Time: 10, Priority: 5
P4 - Arrival Time: 4, Burst Time: 4, Priority: 1
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Problem 9: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 2
P2 - Arrival Time: 10, Burst Time: 6, Priority: 5
P3 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Problem 10: Given the following processes:
P1 - Arrival Time: 4, Burst Time: 7, Priority: 1
P2 - Arrival Time: 8, Burst Time: 7, Priority: 3
P3 - Arrival Time: 10, Burst Time: 10, Priority: 1
P4 - Arrival Time: 7, Burst Time: 2, Priority: 2
Calculate the average waiting time and turnaround time using Shortest Remaining Time Next
(SRTN).
Priority Scheduling
Problem 6: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 6, Priority: 4
P2 - Arrival Time: 1, Burst Time: 9, Priority: 4
P3 - Arrival Time: 0, Burst Time: 5, Priority: 2
P4 - Arrival Time: 10, Burst Time: 9, Priority: 4
P5 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using Priority Scheduling.
Problem 7: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 4
P2 - Arrival Time: 5, Burst Time: 4, Priority: 5
P3 - Arrival Time: 0, Burst Time: 6, Priority: 4
P4 - Arrival Time: 7, Burst Time: 4, Priority: 5
P5 - Arrival Time: 1, Burst Time: 9, Priority: 4
P6 - Arrival Time: 9, Burst Time: 3, Priority: 1
Calculate the average waiting time and turnaround time using Priority Scheduling.
Problem 8: Given the following processes:
P1 - Arrival Time: 8, Burst Time: 2, Priority: 4
P2 - Arrival Time: 1, Burst Time: 8, Priority: 3
P3 - Arrival Time: 9, Burst Time: 10, Priority: 5
P4 - Arrival Time: 4, Burst Time: 4, Priority: 1
Calculate the average waiting time and turnaround time using Priority Scheduling.
Problem 9: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 2
P2 - Arrival Time: 10, Burst Time: 6, Priority: 5
P3 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using Priority Scheduling.
Problem 10: Given the following processes:
P1 - Arrival Time: 4, Burst Time: 7, Priority: 1
P2 - Arrival Time: 8, Burst Time: 7, Priority: 3
P3 - Arrival Time: 10, Burst Time: 10, Priority: 1
P4 - Arrival Time: 7, Burst Time: 2, Priority: 2
Calculate the average waiting time and turnaround time using Priority Scheduling.
Round Robin (RR)
Problem 1: Given the following processes:
P1 - Arrival Time: 9, Burst Time: 3
P2 - Arrival Time: 0, Burst Time: 10
P3 - Arrival Time: 8, Burst Time: 1
P4 - Arrival Time: 8, Burst Time: 8
P5 - Arrival Time: 10, Burst Time: 2
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 3.
Problem 2: Given the following processes:
P1 - Arrival Time: 10, Burst Time: 10
P2 - Arrival Time: 7, Burst Time: 5
P3 - Arrival Time: 4, Burst Time: 2
P4 - Arrival Time: 2, Burst Time: 6
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 5.
Problem 3: Given the following processes:
P1 - Arrival Time: 7, Burst Time: 5
P2 - Arrival Time: 6, Burst Time: 1
P3 - Arrival Time: 0, Burst Time: 9
P4 - Arrival Time: 3, Burst Time: 3
P5 - Arrival Time: 0, Burst Time: 1
P6 - Arrival Time: 9, Burst Time: 5
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 5.
Problem 4: Given the following processes:
P1 - Arrival Time: 10, Burst Time: 4
P2 - Arrival Time: 0, Burst Time: 7
P3 - Arrival Time: 0, Burst Time: 3
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 4.
Problem 5: Given the following processes:
P1 - Arrival Time: 0, Burst Time: 3
P2 - Arrival Time: 1, Burst Time: 10
P3 - Arrival Time: 3, Burst Time: 6
P4 - Arrival Time: 7, Burst Time: 2
P5 - Arrival Time: 4, Burst Time: 7
P6 - Arrival Time: 5, Burst Time: 10
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 2.
Problem 6: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 6, Priority: 4
P2 - Arrival Time: 1, Burst Time: 9, Priority: 4
P3 - Arrival Time: 0, Burst Time: 5, Priority: 2
P4 - Arrival Time: 10, Burst Time: 9, Priority: 4
P5 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 5.
Problem 7: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 4
P2 - Arrival Time: 5, Burst Time: 4, Priority: 5
P3 - Arrival Time: 0, Burst Time: 6, Priority: 4
P4 - Arrival Time: 7, Burst Time: 4, Priority: 5
P5 - Arrival Time: 1, Burst Time: 9, Priority: 4
P6 - Arrival Time: 9, Burst Time: 3, Priority: 1
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 4.
Problem 8: Given the following processes:
P1 - Arrival Time: 8, Burst Time: 2, Priority: 4
P2 - Arrival Time: 1, Burst Time: 8, Priority: 3
P3 - Arrival Time: 9, Burst Time: 10, Priority: 5
P4 - Arrival Time: 4, Burst Time: 4, Priority: 1
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 3.
Problem 9: Given the following processes:
P1 - Arrival Time: 2, Burst Time: 10, Priority: 2
P2 - Arrival Time: 10, Burst Time: 6, Priority: 5
P3 - Arrival Time: 6, Burst Time: 10, Priority: 2
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 3.
Problem 10: Given the following processes:
P1 - Arrival Time: 4, Burst Time: 7, Priority: 1
P2 - Arrival Time: 8, Burst Time: 7, Priority: 3
P3 - Arrival Time: 10, Burst Time: 10, Priority: 1
P4 - Arrival Time: 7, Burst Time: 2, Priority: 2
Calculate the average waiting time and turnaround time using Round Robin (RR). Use a time
quantum of 4.