1 1 vote A system uses two feedback queues:$\text{Q1}$: Round Robin with time quantum $10$ ms $\text{Q2}$: Shortest Job First $\text{Q1}$ has higher priority than $\text{Q2}$ New processes enter $\text{Q1}$ A process that does not finish after one quantum in $\text{Q1}$ moves to $\text{Q2}$Initially both queues are empty.Processes $\text{P1}$ and $\text{P2}$ are created in that order.Their CPU burst times are:$\text{P1}$: $30$ ms $\text{P2}$: $20$ msWhat is their average waiting time?$25$ ms $20$ ms $15$ ms $10$ ms Operating System goclasses goclasses-cs-dpp operating-system goclasses-cs-dpp-day-357 goclasses-os-practice-questions process-scheduling + – GO Classes 115 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
1 1 vote Both first enter $\text{Q1}$.Schedule:$0 - 10: \text{P1}$$\text{P1}$ has $20$ ms remaining and moves to $\text{Q2}$.$10 - 20: \text{P2}$$\text{P2}$ has $10$ ms remaining and moves to $\text{Q2}$.Now $\text{Q1}$ is empty.$\text{Q2}$ uses SJF:$\text{P2}$ remaining $= 10$ ms$\text{P1}$ remaining $= 20$ msSo,$20 - 30: \text{P2}$$30 - 50: \text{P1}$Waiting time:$\text{P1}$ waits from $10$ to $30 = 20$ ms$\text{P2}$ waits from $0$ to $10 = 10$ msAverage $:(20 + 10) / 2 = 15$ msAnswer : C GO Classes answered Aug 26 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.