1 votes 1 votes Consider the following set of processes and the length of CPU burst time given in milliseconds : $\begin{array}{|c|c|} \hline \text{Process} & \text{CPU Burst time (ms)} \\ \hline P_1 & 5 \\ \hline P_2 & 7 \\ \hline P_3 & 6 \\ \hline P_4 & 4 \\ \hline \end{array}$ Assume that processes being scheduled with Round-Robin Scheduling Algorithm with time quantum $4$ ms. Then the waiting time for $P_4$ is ______ ms $0$ $4$ $12$ $6$ Operating System ugcnetcse-dec2018-paper2 operating-system process-scheduling round-robin-scheduling + – Arjun asked Jan 2, 2019 recategorized Jun 23, 2022 by Arjun Arjun 3.1k views answer comment Share Follow See 1 comment See all 1 1 comment reply Vishnu__ commented Jul 10, 2022 reply Follow Share TurnAround Time = Completion Time – Arrival Time. WaitingTime = TurnAroungTime – BurstTime 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Time quantum is $4$, assuming every process arrived at $t=0$ When every process uses $1$ time quantum, 0 4 8 12 16 P1 P2 P3 P4 $P_4$ finished at $t=16$ $waiting\,time= 16-4=12\,ms$ So, $(C)$ should be the answer Shobhit Joshi answered Jan 3, 2019 Shobhit Joshi comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Assume all the processes are arriving at $0$ ms. $ \begin{array} {|c|c|c|c|c|c|} \hline \textbf{Process} & \textbf{Arrival Time} & \textbf{Burst Time} & \textbf{Completion Time} & \textbf{Turn Around Time} & \textbf{Watting time} \\\hline P_{1} & 0 & 5 & 17 & 17 & 12 \\\hline \ P_{2} & 0 & 7 & 20 & 20 & 13 \\\hline \ P_{3} & 0 & 6 & 22 & 22 & 16 \\\hline \ P_{4} & 0 & 4 & 16 & 16 & 12 \\\hline \end {array}$ Gannt chart is as follows: $\begin{array} {|c|c|c|c|c|} \hline P_1 & P_2 & P_3 & P_4 & P_1 & P_2 & P_3 \\ {0-4} & 4-8 & 8-12 & 12-16 & 16-17 & 17-20 & 20-22 \\\hline \end{array}$ So the waiting time of process $P_4$ is $12$ ms. Hira Thakur answered May 18, 2021 Hira Thakur comment Share Follow See all 0 reply Please log in or register to add a comment.