Data Structures & AlgorithmsModerateGATE CS · TCS NQT

Three processes arrive at time 0 with bursts 5, 2 and 7. Round-robin uses quantum 3 and the queue starts as P1, P2, P3. Which process (numbered from 1) completes first?

  1. A. 3
  2. B. 4
  3. C. 2
  4. D. 5

Correct answer: C. 2

P1 runs 0 to 3, P2 runs 3 to 5 and finishes first (it needs only 2). Checking the finish order from the slice simulation avoids assuming the shortest burst always wins.

More Arrays, Strings, Linked Lists, Stacks, Queues and Hashing questions

Exams that ask this topic