Tutorial 2
Tutorial 2
1. Let us consider the set of 5 processes with their arrival time and burst time as given
below:
P1 3 1
P2 1 4
P3 4 2
P4 0 6
P5 2 3
b. If the CPU scheduling policy is SJF preemptive, calculate the average turn-
around time, average waiting time and response time.
2. Given below are the set of 5 processes with their arrival time and burst
time
P2 1 5
P3 2 3
P4 3 1
P5 4 2
a. If the CPU scheduling policy is shortest remaining time first, calculate the
average turn-around time, average waiting time and response time.
b. How many context switches are needed including context switch at time zero
and the end.
3. Consider the set of 6 processes whose arrival time and burst time are given
below-
5. Consider the arrival time and burst time of five different processes as given
below
P2 1 3
P3 2 1
P4 3 2
P5 4 3
a) If the CPU scheduling policy is Round Robin with time quantum = 3 unit,
calculate the average turn-around time, average waiting time and
response time.
b) How many context switches are needed excluding the context switch at time
zero and at the end?
6. Consider following values for the arrival time, burst time and associated
priority for 5 different processes.
P2 1 3 3
P3 2 1 4
P4 3 5 5
P5 4 2 5
7. Consider the set of 5 processes whose arrival time and burst time are given
below-
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 turn-around time and
average waiting time.