Scheduling Algorithms Assignment (CA20s - Full-Time)
Scheduling Algorithms Assignment (CA20s - Full-Time)
Problem 1
Process Burst Time
P1 4
P2 9
P3 8
P4 6
Suppose that the processes arrive in the order: P1, P2, P3, and
P3. Draw Gantt chart then calculate waiting time and turnaround time for each
process, and average waiting time and average turnaround time using first
come first served algorithm (FCFS).
Problem 2
Process Burst Time
P1 12
P2 15
P3 10
P4 6
Suppose that the processes arrive in the order: P1, P2, P3, and P4. Draw Gantt
chart then calculate waiting time and turnaround time for each process, and
average waiting time and average turnaround time using first come first
served algorithm (FCFS).
1
Problem 3
Process Burst Time
P1 4
P2 9
P3 8
P4 6
Suppose that the processes arrive in the order: P1, P2, P3, and
P3. Context switching time of the system is 1 millisecond.
Draw Gantt chart then calculate waiting time and turnaround time for each
process, and average waiting time and average turnaround time using first
come first served algorithm (FCFS).
Problem 4
Process Burst Time
P1 12
P2 8
P3 4
P4 6
P5 10
Suppose that the processes arrive at the same time. Draw Gantt chart then
calculate waiting time and turnaround time for each process, and average
waiting time and average turnaround time using shortest job first (SJF).
2
Problem 5
Given the following processes with their arrival time and burst time.
Process Arrival Time Burst Time
P1 2 5
P2 3 10
P3 6 2
P4 8 5
P5 9 6
Draw Gantt chart then calculate waiting time and turnaround time for each
process, and average waiting time and average turnaround time using shortest
job first (SJF).
Problem 6
Process Burst Time Priority
P1 5 4
P2 2 2
P3 6 5
P4 3 1
P5 7 3
Suppose that the processes arrive at the same time. Draw Gantt chart then
calculate waiting time and turnaround time for each process and average
waiting time and average turnaround time using priority scheduling
algorithms.
3
Problem 7
Process Burst Time Priority
P1 5 5
P2 4 3
P3 5 2
P4 8 4
P5 2 1
Suppose that the processes arrive at the same time. Draw Gantt chart then
calculate waiting time and turnaround time for each process and average
waiting time and average turnaround time using priority scheduling
algorithms.
Problem 8
Process Burst Time
P 15
1
P 10
2
P 12
3
Suppose that the processes arrive at the same time. Draw Gantt chart then
calculate waiting time and turnaround time for each process, and average
waiting time and average turnaround time using round robin algorithm (RR)
with time quantum = 5 milliseconds.
4
Problem 9
Process Burst Time
P 9
1
P 20
2
P 14
3
P 7
4
Suppose that the processes arrive at the same time. Draw Gantt chart then
calculate waiting time and turnaround time for each process, and average
waiting time and average turnaround time using round robin algorithm (RR)
with time quantum = 6 milliseconds.
Problem 10
Process Burst Time
P 6
1
P 15
2
P 12
3
P 10
4
P 5
5
Suppose that the processes arrive at the same time. Draw Gantt chart then
calculate waiting time and turnaround time for each process, and average
waiting time and average turnaround time using round robin algorithm (RR)
with time quantum = 8 milliseconds.
END