Skip to content
Official PYQ · 1993

GATE CS 1993 Q7.10 — CPU Scheduling

Explain with AI

Assume that  the following jobs are to be executed on a single processor systemJob IdCPU Burst Timep4q1r8s1t2\begin{array}{|c|c|} \hline \textbf{Job Id} & \textbf{CPU Burst Time} \\ \hline \text{p} & 4 \\ \hline \text{q} & 1 \\ \hline \text{r} & 8 \\ \hline \text{s} & 1 \\ \hline \text{t} & 2 \\ \hline \end{array}The jobs are assumed to have arrived at time 0+0^+ and in the order p,q,r,s,tp,q,r,s,t. Calculate the departure time (completion time) for job pp if scheduling is round robin with time slice 11

Choose one option
View worked solution

Answer: C

To find the departure (completion) time of job pp, we trace the execution of the jobs using Round Robin scheduling with a time quantum of 11 unit.

All jobs arrive at 0+0^+ in the order: p,q,r,s,tp, q, r, s, t. The initial ready queue is: [p, q, r, s, t].

Step-by-step execution trace:

  1. Time [0 – 1]: pp executes (remaining burst: 33). Ready queue: [q, r, s, t, p]
  2. Time [1 – 2]: qq executes (remaining burst: 00, completes). Ready queue: [r, s, t, p]
  3. Time [2 – 3]: rr executes (remaining burst: 77). Ready queue: [s, t, p, r]
  4. Time [3 – 4]: ss executes (remaining burst: 00, completes). Ready queue: [t, p, r]
  5. Time [4 – 5]: tt executes (remaining burst: 11). Ready queue: [p, r, t]
  6. Time [5 – 6]: pp executes (remaining burst: 22). Ready queue: [r, t, p]
  7. Time [6 – 7]: rr executes (remaining burst: 66). Ready queue: [t, p, r]
  8. Time [7 – 8]: tt executes (remaining burst: 00, completes). Ready queue: [p, r]
  9. Time [8 – 9]: pp executes (remaining burst: 11). Ready queue: [r, p]
  10. Time [9 – 10]: rr executes (remaining burst: 55). Ready queue: [p, r]
  11. Time [10 – 11]: pp executes (remaining burst: 00, completes).

Thus, job pp completes its execution at time 1111.

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

Published
Report a correction
Keep exploringMore CPU Scheduling questions