Answer is. 2.33 ms
Waiting Time of a process is the time spend by it in READY queue only
WT = total TAT - ( CPU + IO )
|
TAT |
IO |
CPU |
WT |
P |
10 |
4 |
5 |
1 |
Q |
13 |
4 |
3 |
6 |
R |
6 |
3 |
3 |
0 |
Avg Waiting TIme =$\frac{1+6+0}{3} = 2.33 $ms
Some useful EDIT :-->
Time spent for waiting for the CPU is known as waiting time .
But, In a system running a single process, the time spent waiting for I/O is wasted, and those CPU cycles are lost forever.
The time spent for I/O is also known as waiting time for a system running only a single process, because that CPU cycles are lost in that wait .
But What happens for multiprocessing system ? Now, this is why we use multiprocessing systems in which processes waiting in READY queue, are actually waiting for CPU which is waiting time .
But what about waiting for I/O ? isn't that also waiting time. Yes, for a single process system.
But for a multiprocessor system,i.e, A scheduling system allows one process to use the CPU while another is waiting for I/O, thereby making full use of lost CPU cycles ,hence, process which was waiting in single process system for I/O made lose of CPU cycles, which is now covered by the other process which is dispatched by the dispatcher to cover the losses .
Moreover,
It is assumed in the questíon, that processes execute has sufficient number of I/O devices and the OS of the computer assigns different I/O devices to each process , hence, there is no waiting time for a process blocked under I/O . Even if it was, it is covered by scheduling other processes.