The Gateway to Computer Science Excellence
+17 votes

Assume that  the following jobs are to be executed on a single processor system$$\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^+$ and in the order $p,q,r,s,t$. Calculate the departure time (completion time) for job $p$ if scheduling is round robin with time slice $1$

  1. $4$
  2. $10$
  3. $11$
  4. $12$
  5. None of the above
in Operating System by Veteran (52.2k points)
edited by | 2.2k views

What does 0indicates here ?

explain please ....

meaning of 0+ and in this question no arrival time is mention so how we apply any algorithms ?
It means all the 5 jobs are available in ready queue at the same time(t = 0),and in the queue, their arrival order is p,q,r,s,t.

whenever the arrival time of 2 or more jobs are same then pick them according to their order in the ready queue.

3 Answers

+20 votes
Best answer
Answer: (C)

Execution order: $pqrstprtpr\mathbf{p}rrrrr$
by Boss (33.8k points)
edited by
when all process arrives at 0 then it will work like FCFS with TQ=1???
Yes...for 1st iteration since nothing is mentioned so we give priority based on Job ID.

Even when the time quantum becomes too large then also Round Robin behaves like FCFS
+5 votes
p will depart at t = 11
by Veteran (60.5k points)
edited by
+4 votes

Round Robin


Arrival time of all the process is same

gantt chart
 p  q    r   s   t   p  r  t  p  r  p
0 1 2 3 4 5 6 7 8 9 10     11

Answer - option c

by Active (4.5k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,645 questions
56,565 answers
101,699 users