CPU Scheduling

Answer & solution
Official answer: A
Approach: Build a timeline of processor release events, selecting only among processes still waiting at each event.
At t=0, M1 selects P1 and M2 selects P2. Neither process waits. Their completion times are 20 and 16 respectively.
At t=16, M2 becomes free while P3 and P4 are waiting. M2 ranks P3 above P4, so P3 begins at 16 and finishes at 41. At t=20, M1 becomes free; P3 is already running and cannot be scheduled again, so M1 begins P4, which finishes at 30.
Because all arrivals are at zero and scheduling is non-preemptive, waiting times equal start times: P1=0, P2=0, P3=16, P4=20. Their average is (0+0+16+20)/4=9.00 ms, option A.
Completion times must not be averaged as waiting times, and priority orders are applied only to eligible waiting processes, not to processes already executing elsewhere.