Operating Systems · Question 6 · Medium

Operating Systems question 6

Three processes arrive at time 0 in the order P1, P2, P3 with CPU burst times 6, 3 and 1 ms. With Round Robin scheduling and a time quantum of 2 ms, what is the average waiting time?

  1. 1.67 ms
  2. 5.00 ms
  3. 4.33 ms
  4. 3.67 ms
Answer and explanation

Answer: C. 4.33 ms

Explanation: The Gantt chart is P1 0-2, P2 2-4, P3 4-5, P1 5-7, P2 7-8, P1 8-10. Completion times are 10, 8 and 5, so the waiting times are 10-6 = 4, 8-3 = 5 and 5-1 = 4. The average is 13/3 ≈ 4.33 ms.

Previous: Where does the operating system save a process's program counter, CPU… · Next: Process (arrival time, burst time) in ms: P1 (0, 8), P2 (1, 4), P3 (2, 2), P4…

Practise operating systems

Try a fresh set of operating systems questions with an explanation after every answer, free and without signing up: Operating Systems practice. Or sit a full placement mock test.

More operating systems questions

More technical & programming practice

Computer Networks · Software Engineering · Cloud & DevOps · GenAI Basics · Pseudo-code · C Programming · Java · Python

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge