Processes P1, P2, and P3 are run concurrently on a computer system with one CPU. Process P1 arrives first at time 0, and uses the CPU for 6 ms before finishing. Process P2 arrives shortly after P1, still at time 0. Process P2 loops two times; for each iteration of the loop, P2 uses the CPU for 1 ms and then it does I/O for 5 ms. Process P3 is identical to P2, but arrives shortly after P2, still at time 0. Assume that there is no overhead due to context switches.
ey I am trying to better understand termination values and have been trying to do a few practice questions involving CPU scheduling. I am having trouble calculating the terminated states for the question below. For the sample question below, Could you please give the exact termination time for each P value.
A. Round Robin with a 1 ms time slice
B. Shortest Job First (assuming CPU bursts are known, and thus do not have to be estimated)
Please also provide a brief explanation for why this is the case thanks.
Processes P1, P2, and P3 are run concurrently on a computer system with one CPU. Process P1
arrives first at time 0, and uses the CPU for 6 ms before finishing. Process P2 arrives shortly after
P1, still at time 0. Process P2 loops two times; for each iteration of the loop, P2 uses the CPU for
1 ms and then it does I/O for 5 ms. Process P3 is identical to P2, but arrives shortly after P2, still
at time 0. Assume that there is no overhead due to context switches.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images