OA. free
Free
Sirionlabs, Inc Core Computer Science Core Computer Science Medium

Consider the set of 5 processes whose arrival time and burst time are given below: Process...

Sirionlabs, Inc technical mcq question, verified with a worked answer. Free to practise - no sign-up.

Consider the set of 5 processes whose arrival time and burst time are given below:

Process Arrival Time Burst Time
P1 0 5
P2 1 3
P3 2 1
P4 3 2
P5 4 3

If the CPU scheduling policy is Round Robin with time quantum = 2 units, calculate the average waiting time and average turnaround time.

Choose one option.
Show answer & explanation
Answer: A. avg waiting time = 5.8 unit, avg turn around time = 8.6 unit

Simulating Round Robin with quantum 2 yields completion times P1=13, P2=12, P3=5, P4=9, P5=14, giving average turnaround time 8.6 units and average waiting time 5.8 units.

Step-by-step Derivation:
Step 1: Gantt chart: [0-2] P1, [2-4] P2, [4-5] P3, [5-7] P4, [7-9] P5, [9-11] P1, [11-12] P2, [12-13] P5, [13-14] P1.
Step 2: Turnaround times: P1=13, P2=11, P3=3, P4=6, P5=10. Average = 8.6.
Step 3: Waiting times: P1=8, P2=8, P3=2, P4=4, P5=7. Average = 5.8.