i am getting answer as 6....to calculate waiting time i have removed CPU time used by the process (BT) from total time spend inside(TAT)....not included I/O time(i think I/O is also included in waiting time)..is it correct?
Three processors P,Q,R are started at times 0 ,2 ,3 milliseconds respectively. Each of the process performs a computation that required TC1 CPU milliseconds then initiates a single I/O operation that lasts for TIO milliseconds and at the last it again performs a computation that required TC2 CPU milliseconds. It is assumed that the processes execute has sufficient number of I/O devices and the OS of the computer assigns different I/O devices to each process . Also scheduling overhead of the OS is negligible. The processes have the following characteristics :
Process |
Arrival Time |
Priority |
TC1 |
TIO |
TC2 |
P |
0 |
2 |
1 |
5 |
3 |
Q |
2 |
3(L) |
3 |
3 |
1 |
R |
3 |
1(H) |
2 |
3 |
1 |
What is the average waiting time (in milliseconds) ?