This chapter and all the remaining chapters focus on scheduling for the case of an M/G/1 queue. We always assume ρ < 1 and that G is continuous with finite mean and finite variance. Every scheduling policywe consider iswork-conserving (i.e., whenever there is a job to be worked on, some job will receive service).
Definition 29.1 A non-preemptive service order is one that does not preempt a job once it starts service (i.e., each job is run to completion).
This chapter focuses on non-preemptive scheduling policies that do not make use of knowing a job's size.
FCFS, LCFS, and RANDOM
The following three non-preemptive policies do not assume knowledge of job size:
FCFS: When the server frees up, it always chooses the job at the head of the queue to be served and runs that job to completion.
LCFS (non-preemptive): When the server frees up, it always chooses the last job to arrive and runs that job to completion.
RANDOM: When the server frees up, it chooses a random job to run next.
Question: When would one use LCFS?
Answer: Consider the situation where arriving jobs get pushed on a stack, and therefore it is easiest to access the job that arrived last (e.g., the task at the top of the pile on my desk!).
Question: Which of these three non-preemptive policies do you think has the lowest mean response time?
Answer: It seems like FCFS should have the best mean response time because jobs are serviced most closely to the time they arrive, whereas LCFS may make a job wait a very long time. However, surprisingly, it turns out that all three policies have exactly the same mean response time. In fact, an even stronger statement can be made.