I'm trying to use MQS to create a Gantt chart of 5 processes (P1-P5) as well as their waiting, response, and turnaround times (and averages of those metrics) within a CPU task schedule. Here's the basic table of arrival times and bursts:

enter image description here

Here's my actual work version after ticking off the finished processes. The time quantum for each time slice is (2 queues) TQ1=4 and TQ2=3. Note that I'm doing MQS and NOT MLFQ:

enter image description here

It just doesn't feel like I'm doing MQS right here, I know this gets a little complex but maybe someone can point out where I'm going totally wrong.

1 Answer 1


Since you have a Multilevel queue scheduling it would imply that higher priority processes will be handled first in which case P1 will be handled before you have P2 handled. But at 6 slot P3 will request processing which imply that the cpu will round robin between P1 and P3 until both are ready. Once P1 and P3 are ready the CPU will handle the remaining priority one processes according to the fashion of their request for processing.

I think that P1 will continue to execute without interference by P2. P3 will enter and the cpu will round robin between P1 and P3 until both are ready. Next will be the turn of P2, P4 and P5 to be executed in the same manner since every queue will be execuited in a round robin fashion.

Therefore one needs to take into account priority. The higher the priority will imply that the process will keep the resources for himself until it is ready, or another process with a higher priortity comes in and starts executing ( can lead to starvation) or it needs to share it with another process of similar priority as it happens in this scenario in a round robin fashion

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.