In the diagram above, process P2, which has the greatest priority (priority 1), will be the first to run on the CPU. Then, processes with lesser priorities will get to run, until the process with the least priority, process P4, will run.
The average waiting time in this schedule is (0 + 1 + 6 + 16 + 18) / 5 = 41 / 5 = 8.2 ms, which is the same as the average response time.
[Try at home: compute the average waiting time for the scenario on the previous slide if we were to use the FCFS, SJF, and SRJF algorithms.]