Processes P1, P2 and P3 need 5, 3 and 1 units of processor time. All arrive at time 0 in that order. Round robin is used with a time slice of 2 units. At what time does each process finish?
- P1 runs 0 to 2 (3 left), P2 runs 2 to 4 (1 left), P3 runs 4 to 5 and finishes.
- P1 runs 5 to 7 (1 left), P2 runs 7 to 8 and finishes.
- P1 runs 8 to 9 and finishes. Check: 5 + 3 + 1 = 9 units in total.
Answer: P3 finishes at time 5, P2 at time 8 and P1 at time 9.