0% found this document useful (0 votes)
51 views3 pages

Basic Scheduling Algorithms For Single Machine Problems: Processing Jobs With Preemption

This document discusses scheduling jobs with preemption on a single machine to minimize total completion time. It shows that for a problem with jobs released at time 0 and preemption allowed, there exists an optimal non-preemptive schedule. It also describes the Shortest Remaining Processing Time rule, which is proven to be optimal for the problem of minimizing total completion time with job release dates and preemption allowed.

Uploaded by

yakuphan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views3 pages

Basic Scheduling Algorithms For Single Machine Problems: Processing Jobs With Preemption

This document discusses scheduling jobs with preemption on a single machine to minimize total completion time. It shows that for a problem with jobs released at time 0 and preemption allowed, there exists an optimal non-preemptive schedule. It also describes the Shortest Remaining Processing Time rule, which is proven to be optimal for the problem of minimizing total completion time with job release dates and preemption allowed.

Uploaded by

yakuphan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Single machine problems: 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

Minimising total completion time with nonzero release dates


Σ Cj
and preemption allowed: 1|rj, pmtn|Σ

Consider 1|rj, pmtn|ΣCj.

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

Theorem 2. For problem 1|rj, Pmtn|ΣCj, the SRPT rule is optimal.

Proof (pairwise interchange argument)

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.

We have obtained a ‘better’ schedule S’:


Ci’ < Ci
Ck’ = Ck
Since in the new schedule all jobs other than i and k have the same the completion times as before, we
obtain:

∑ C − ∑ C = (C ) − (C
n n
'
j j
' '
i + Ck i + C k ) < 0.
j =1 j =1

This contradicts the optimality of schedule S. 1

You might also like