in Operating System retagged by
413 views
5 votes
5 votes
The following table lists the arrival time and execution time of $5$ threads.
$$
\begin{array}{c|c|c}
\text{Job} & \text{Arrival time} & \text{Execution time} \\
\hline \mathrm{A} & 0 & 45 \\
\mathrm{~B} & 19 & 15 \\
\mathrm{C} & 40 & 30 \\
\mathrm{D} & 79 & 50 \\
\mathrm{E} & 89 & 30
\end{array}
$$
Consider Round-Robin with a time quantum of $20$ units. If the Gantt chart starts at zero, what is the time at which $\mathrm{E}$ finishes its execution?
in Operating System retagged by
413 views

1 comment

$ \large{\colorbox{yellow}{Detailed video solution of this question with direct time stamp}}$
All India Mock Test 2 - Solutions Part 2

0
0

1 Answer

4 votes
4 votes
$$
\begin{array}{c|c|c|}
\text{Time} & \text{Running Thread} & \text{Queue of threads} \\ & &  \text{at the end (remaining time)} \\
\hline 0-20 & \mathrm{~A} & \mathrm{~A}(25), \mathrm{B}(15) \\
20-35 & \mathrm{~B} & \mathrm{~A}(25) \\
35-55 & \mathrm{~A} & \mathrm{C}(30), \mathrm{A}(5) \\
55-75 & \mathrm{C} & \mathrm{A}(5), \mathrm{C}(20)) \\
75-80 & \mathrm{~A} & \mathrm{C}(10), \mathrm{D}(50) \\
80-90 & \mathrm{C} & \mathrm{D}(50), \mathrm{E}(30) \\
90-110 & \mathrm{D} & \mathrm{E}(30), \mathrm{D}(30) \\
110-130 & \mathrm{E} & \mathrm{D}(30), \mathrm{E}(10) \\
130-150 & \mathrm{D} & \mathrm{E}(10), \mathrm{D}(10) \\
150-160 & \mathrm{E} & \mathrm{D}(10) \\
160-170 & \mathrm{D} &
\end{array}
$$
edited by
Answer:

Related questions