Single Machine Scheduling
1. Assumptions
During single machine scheduling, we assume:
- A set of
jobs is immediately ready to be scheduled. - Deterministic processing times known in advance.
- No preemption.
- Single server machine.
- No explicit setup times.
- No machine idling while jobs are waiting.
In single machine scheduling, there is no advantage in using preemption. This is because interlacing jobs results in an average later completion time than running them sequentially.
This is a non-idling schedule as there are no gains by inserting idle times within a single machine.
2. Trivial Case
3. SPT
Here, the shortest processing time (SPT) is optimal.
PROOF (EXAMINABLE!)
Let
denote the -th scheduled job, with processing time and completion time . Since all jobs are released at time , we have:
This is minimized when
, i.e. shorter jobs are best scheduled earlier.
The complexity of this is just the cost of sorting:
4. WSPT
Now, weighted shortest processing time (WSPT, Smith's Rule) is optimal - schedule jobs in non-decreasing
PROOF (EXAMINABLE!)
Assume a non WSPT schedule
to be optimal. Thus, adjacent jobs , in s.t. . Let be the schedule obtained by swapping and . Then, for , where is the jobs scheduled before and : For
: Therefore, if
as in , then: Hence,
is better than , contradicting the optimality of . Thus, every optimal schedule must be WSPT.
5. Job Chains
A job chain is a set of jobs with precedence constraints such that each job has at most one predecessor and one successor.
5.1 Non-Interruptible Chains
If chains are non-interruptible, then the optimal schedule is to schedule chains in non-decreasing order of their total processing times (i.e. treat the chain as a single job).
5.2 Interruptible Chains
If chains are interruptible, WPST may be applied to sub-chains. For a given chain
Thus, we find among all initial sub-chains of
5.3 Chain Method
To schedule, we use the chain method:
- Compute the
-factor for each chain. - Select chain
with the minimum -factor, breaking ties arbitrarily. - Schedule the initial-subchain that determines
. Remove the corresponding jobs from and update . - If jobs remain to be scheduled, repeat from step 2.
This is optimal for
6. Stochastic Scheduling
If
This is minimized when
This also generalizes to Weighted Shortest Expected Processing Time (WSEPT), which schedules jobs in increasing
If the
are exponentially distributed with rates , and the weights are , this is known as the -rule.
7. Summary
| Problem | P/NP | Times | Optimal Policy |
|---|---|---|---|
| P | Deterministic | Random | |
| P | Deterministic | SPT | |
| P | Deterministic | WSPT | |
| P | Deterministic | Chain Method | |
| P | Stochastic | SEPT | |
| P | Stochastic | WSEPT |