Answer: 12 : 12
To minimize the average waiting time of a set of processes, the optimal scheduling algorithm is Shortest Job First (SJF).
We are given three processes arriving at time t=0 with the following CPU burst times:
- P1: 16 ms
- P2: 20 ms
- P3: 10 ms
Sorting these processes in ascending order of their burst times (SJF order):
Execution Order: P3→P1→P2
Gantt Chart:
The execution timeline is as follows:
P3010P126P246
Waiting Time Calculation:
Since all processes arrive at time t=0, the waiting time for each process is simply its start time:
- Waiting time of P3=0 ms
- Waiting time of P1=10 ms
- Waiting time of P2=26 ms
Average Waiting Time=30+10+26=336=12 ms