Lably
Skip to content

M/G/1 queue

Aspect of queueing theory

  • 4 min read
  • 7 chapters

Related on Lably

Through Probability distribution, Random variable and Independence (probability theory)

Model definition

A queue represented by a M/G/1 queue is a stochastic process whose state space is the set {0,1,2,3...}, where the value corresponds to the number of customers in the queue, including any being served. Transitions from state i to i + 1 represent the arrival of a new customer: the times between such arrivals have an exponential distribution with parameter λ. Transitions from state i to i − 1 represent a customer who has been served, finishing being served and departing: the length of time required for serving an individual customer has a general distribution function. The lengths of times between arrivals and of service periods are random variables which are assumed to be statistically independent.

Scheduling policies

Customers are typically served on a first-come, first-served basis, other popular scheduling policies include

  • processor sharing where all jobs in the queue share the service capacity between them equally
  • last-come, first served without preemption where a job in service cannot be interrupted
  • last-come, first served with preemption where a job in service is interrupted by later arrivals, but work is conserved
  • generalized foreground-background (FB) scheduling also known as least-attained-service where the jobs which have received least processing time so far are served first and jobs which have received equal service time share service capacity using processor sharing
  • shortest job first without preemption (SJF) where the job with the smallest size receives service and cannot be interrupted until service completes
  • preemptive shortest job first where at any moment in time the job with the smallest original size is served
  • shortest remaining processing time (SRPT) where the next job to serve is that with the smallest remaining processing requirement

Service policies are often evaluated by comparing the mean sojourn time in the queue. If service times that jobs require are known on arrival then the optimal scheduling policy is SRPT.

Policies can also be evaluated using a measure of fairness.

Sign in to keep reading

6 more chapters are free with a Lably account.

More in Statistics