Skip to content
Official PYQ · 1996

GATE CS 1996 Q2.20 — CPU Scheduling

Explain with AI

Four jobs to be executed on a single processor system arrive at time 00 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

Choose one option
View worked solution

Answer: D

To find the completion time of job AA under Round Robin (RR) scheduling with a time quantum (qq) of 11 time unit, we can trace the execution order using a Gantt chart.

Given Data:

  • Jobs: A,B,C,DA, B, C, D (arriving at time 00 in this order)
  • Burst Times: A=4A = 4, B=1B = 1, C=8C = 8, D=1D = 1
  • Time Quantum (qq): 11

Execution Trace:

Initially, at t=0t = 0, the ready queue is: [A, B, C, D].

  1. Interval [0−1][0 - 1]: AA executes for 11 unit. Remaining burst of A=3A = 3.
    Ready queue becomes: [B, C, D, A]
  2. Interval [1−2][1 - 2]: BB executes for 11 unit. Remaining burst of B=0B = 0.
    BB completes at t=2t = 2. Ready queue becomes: [C, D, A]
  3. Interval [2−3][2 - 3]: CC executes for 11 unit. Remaining burst of C=7C = 7.
    Ready queue becomes: [D, A, C]
  4. Interval [3−4][3 - 4]: DD executes for 11 unit. Remaining burst of D=0D = 0.
    DD completes at t=4t = 4. Ready queue becomes: [A, C]
  5. Interval [4−5][4 - 5]: AA executes for 11 unit. Remaining burst of A=2A = 2.
    Ready queue becomes: [C, A]
  6. Interval [5−6][5 - 6]: CC executes for 11 unit. Remaining burst of C=6C = 6.
    Ready queue becomes: [A, C]
  7. Interval [6−7][6 - 7]: AA executes for 11 unit. Remaining burst of A=1A = 1.
    Ready queue becomes: [C, A]
  8. Interval [7−8][7 - 8]: CC executes for 11 unit. Remaining burst of C=5C = 5.
    Ready queue becomes: [A, C]
  9. Interval [8−9][8 - 9]: AA executes for 11 unit. Remaining burst of A=0A = 0.
    AA completes at t=9t = 9.

Thus, the completion time of job AA is 99.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore CPU Scheduling questions