I want to study a scheduling scenario by using queuing theory.

This is the situation:

  • one CPU with mean service time $1/μ$
  • two infinite queues with arrival rate $λ$
    • queue B has priority over queue A, i.e if the CPU is executing a job of A type, it stops (preemption) that job and executes (for all) the B job. Then if the B queue is empty it continues to execute the A jobs until a new B job/s arrives.

I would calculate some stability conditions, but I have never worked on systems like this.

If I would see the system as M/M/1 with only the queue with higher priority I could use $λ < \mu$ relation, but what about the queue A behaviour?

In the end, I have to do some simulations (with different parameters) and get some results about waiting times in the queues. I am doing some queuing theory modelling first to calibrate a bit the parameters of the system (inter-arr times and job tasks time, both exponential for both queues, CPU speed..)

I have read this question, but it is slightly different for my case/

What can I do?

  • $\begingroup$ I think you are just describing a priority queuing system with preemption; see, e.g., this link. In terms of stability conditions, I believe it's just $(\lambda_A+\lambda_B)/\mu < 1$ since, in terms of stability, it doesn't matter which priority class the job came from. $\endgroup$ – LarrySnyder610 May 18 at 12:45
  • $\begingroup$ @LarrySnyder610 thank you for the reply! I have one other question: since the tasks have lengths that are exponentially distributed (one for A and one for B) and the CPU has a fixed clock. Should I consider different service time depending on the queue? $1/μ_A$ and $1/μ_B$ $\endgroup$ – linofex May 19 at 15:20
  • $\begingroup$ Oh, if the service times are different for the different priority classes then the stability condition isn't as simple. If I recall, it's not too hard, but you'll find it when you look into the priority queuing literature. $\endgroup$ – LarrySnyder610 May 19 at 20:02
  • $\begingroup$ I found some material about this. I am asking if, it Is correct to consider two serving time if I have task duration from two different distributions $\endgroup$ – linofex May 19 at 20:04
  • $\begingroup$ Yes, but I don't remember the details. $\endgroup$ – LarrySnyder610 May 19 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.