Basic Scheduling Algorithms For Single Machine Problems: Processing Jobs With Preemption
Basic Scheduling Algorithms For Single Machine Problems: Processing Jobs With Preemption
Consider a problem of scheduling jobs with preemption. In this problem, processing of any job can be
interrupted and resumed later, the total processing time of all parts of job j being equal to pj.
The following exercise demonstrates that if all jobs are released at the same time (rj=0), there is no
advantage to process the jobs with preemption. In other words, for problem 1|pmtn| ΣCj there exists an
optimal schedule without preemption.
An instance of problem 1|pmtn| ΣCj with n=5 jobs is given by job processing times
p1 = 3; p2 = 13; p3 = 4; p4 =2; p5 =5.
Schedule S is represented by the Gantt chart below.
Construct schedule S’ without preemption and without increasing completion times of all jobs.
3 5 2 3 1 5 2 4 2
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28
Consider the general problem 1|pmtn| ΣCj with n jobs and arbitrary processing times. To show that
there exists an optimal nonpreemptive schedule describe a transformation that modifies an arbitrary
preemptive schedule S into a nonpreemptive schedule S’ without increasing the completion times of
all jobs.
……………………………………………………………………………………………………………
……………………………………………………………………………………………………………
1
Single machine problems: preemption
Shortest Remaining Processing Time (SRPT) rule: each time that a job is completed, or at the next
release date, the job to be processed next has the smallest remaining processing time among the
available jobs.
Example:
Job rj pj
1 0 13
2 3 6
3 14 8
4 18 3
5 22 5
6 25 3
7 30 4
8 33 1
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42
Consider a schedule in which available job i with the shortest remaining processing time is not being
processed at time t, and instead available job k is being processed. Let pi’ and pk’ denote the remaining
processing times for jobs i and k after time t, so pi’<pk’.
In total pi’+pk’ is spent on jobs i and k after time t. We assume that Ci <Ck.
i k i k i k k
S … … k …
t C Ck
i i i i k k k k
S’ j … … k …
t C’ Ck’
2
Single machine problems: preemption
Interchange:
1) Take the first pi’ units of time that were devoted to either of jobs i and k after time t, and use
them instead to process job i to completion.
2) Take the remaining pk’ units of time that were spent processing i and k after time t, and use
them to schedule job k.
∑ C − ∑ C = (C ) − (C
n n
'
j j
' '
i + Ck i + C k ) < 0.
j =1 j =1