Calculating wating time


#1

what is the average waiting time of following:

time quantumn :10

process-name burst-time

p1 10
p2 15
p3 7
p4 5


#2

process 1 waits 0 seconds, process 2 waits 22 seconds.
process 3 waits 20 seconds, process 4 waits 27 seconds.
total sum is 69.
average waiting time is 69/4.

(0 + (32-10)+ 20 + 27)/4= 69/4= 17.25