Chapter Two Summary
Chapter Two Summary
Problem-01:
Process Id Arrival time Burst time
P1 3 4
P2 5 3
P3 0 2
P4 5 1
P5 4 3
If the CPU scheduling policy is FCFS, calculate the average waiting time and average turn
around time.
Gantt Chart-
P1 7 7–3=4 4–4=0
P2 13 13 – 5 = 8 8–3=5
P3 2 2–0=2 2–2=0
P4 14 14 – 5 = 9 9–1=8
P5 10 10 – 4 = 6 6 –3=3
If the CPU scheduling policy is SJF non-preemptive, calculate the average waiting time and
average turn around time.
Solution-
Gantt Chart-
Now, we know-
If the CPU scheduling policy is SJF preemptive, calculate the average waiting time and
average turn around time.
Solution-
Gantt Chart-
Now, we know-
Consider the set of 5 processes whose arrival time and burst time are given below-
If the CPU scheduling policy is Round Robin with time quantum = 2 unit, calculate the average
waiting time and average turn around time.
Solution-
Gantt Chart-
Ready Queue-
Now, we know-
Problem-05:
Consider the set of 5 processes whose arrival time and burst time are given below-
If the CPU scheduling policy is priority non-preemptive, calculate the average waiting time and
average turn around time. (Higher number represents higher priority)
Now, we know-
Now,
Problem-06:
Consider the set of 5 processes whose arrival time and burst time are given below-
If the CPU scheduling policy is priority preemptive, calculate the average waiting time and
average turn around time. (Higher number represents higher priority)
Gantt Chart-
Now, we know-
Now,