Skip to main content

GATE CSE 1996Operating System › CPU SchedulingVerified

GATE CSE 1996 PYQ: Four jobs to be executed on a single processor system arrive at time 0 0 0 in the order A , B , C , D A, B,…

Four jobs to be executed on a single processor system arrive at time 0 in the order A,B,C,DA, B, C, D. Their burst CPU time requirements are 4,1,8,14, 1, 8, 1 time units respectively. The completion time of AA under round robin scheduling with time slice of one time unit is

  1. A
    10
  2. B
    4
  3. C
    8
  4. D
    9
    Correct answer

Answer

(D) 9 9 9

Approach

Simulate round-robin scheduling with time quantum 1 unit. Keep all four jobs in a FIFO ready queue, and after each one-unit execution, requeue a job only if it still has remaining burst time.

Under round-robin with a quantum of 1, A is executed in three separate one-unit slices. The final slice for A runs from time 8 to time 9, making its completion time 9 time units. Thus option D is correct.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.