If the question was chaged a little; The processes** arrived at 5 instead of 0 secs**. Then how would the asnwer change it it did?

Dark Mode

9,132 views

22 votes

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

- $10$
- $4$
- $8$
- $9$

0

32 votes

Best answer

The completion time of $A$ will be $9$ Unit.

**Hence, option (D) is correct.**

Here, is the sequence (Consider each block takes one time unit)

$$\begin{array}{|c|c|c|} \hline \textbf {A} &\textbf {B} & \textbf {C} & \textbf{D }& \textbf{A}& \textbf{C}& \textbf{A}& \textbf{C}& \textbf{A} \\\hline \end{array}$$

Completion time of $A$ will be $9$.

18 votes

here all process arrive at time 0.so there order of execution will be A B C D, in this manner completion time for A is 9

7

@rajesh jaiswal

No you are wrong.

in this question they start from 0 and **time slice / time quantum is 1 . This is Round robin.**

The sequence of processA B C D A C A C A based on their burst time ( with each CPU time needed 4,1,8,1 for A B C D respectively.Burst Time:Time required by a process for CPU execution.). this sequence is based on their burst time.

Now **Completion Time means** Time at which process completes its execution.

So according to sequence there are 9 elements in the sequence and each takes 1 time unit (swap and again come because of RR ) and total completion time is 9. Finally at time 9 process A completes it's execution .

hence answer is 9 , option D.

Reference:

http://quiz.geeksforgeeks.org/gate-notes-operating-system-process-scheduling/

3