In: Computer Science
Consider a job mix in which there is one CPU-intensive job, A, that has a single infinitely long CPU burst, and 3 I/O-intensive jobs, B, C, and D. The scheduler uses Round Robin scheduling with a time quantum of 3 ms. Here is an observed execution, where initially A is running and B, C, and D are in the ready queue in this order:
AAAoBBoCoDoAAAoBBoAAAoDoAAAoBBoCoDoAAAoBBo
Answer the following questions based on the above. Explain and give a specify a part of the execution.
a) Could any of B’s I/O-burst time be 6 ms? Explain.
b) Could any of B’s I/O-burst time be 4 ms? Explain.
The solution for the above problem is given below and if you feel any problem then feel free to ask.
Solution:-
a) Yes, B's second I/O burst time can be 6 ms as in between the second and third execution of B in the scheduling there are two processes running first A runs for 3 ms and then D for 1 ms and then again A for 3 ms which sums up to be 7 ms which is more than the given I/O burst time which is 6 ms. Hence, the Burst time for the second time when B goes for I/O operation can be 6 ms as it is running after 7 ms from its previous run.
b) Yes, the I/O burst time of B can also be 4 ms for the first and second time it goes for I/O operation. As in both first and third time, there are three processes running first C runs for 1 ms and then D for 1 ms and then A for 3 ms which sums up to be 5 ms which is more than the I/O burst time which is given as 4 ms. Hence, the Burst time for the first and third time when B goes for I/O operation can be 4 ms as it is running again after 5 ms from its previous runs in scheduling in both cases.