Upload
shibbirtanvin
View
23
Download
4
Tags:
Embed Size (px)
Citation preview
Shibbir Ahmed
Student Id : 0805097
Determininstic Rounding of Linear Programs
Chapter: 4 Section: 4.1 Chapter: 4
Section: 4.1
Minimizing the Sum of Completion Times on a Single Machine
February 23, 2014
Sunday
Overview of Section 4.1
Considering a Problem of Scheduling Jobs on a Single Machine with given Inputs & Constraints to minimize the sum of job completion time
Illustrating an example of Nonpreemptive Schedule
Finding an optimal solution to the Preemptive version of the scheduling problem via the rule of Shortest Remaining Processing Time (SRPT)
Illustrating an example of Preemptive Schedule using SRPT rule
2/15
Overview of Section 4.1 (contd.)
Observation from the fact that an Optimal Nonpreemptive Schedule is feasible for the Preemptive Scheduling problem
Lemma showing that scheduling nonpreemptively does not delay the jobs by too much
Proving a Theorem for scheduling a single machine to minimize the sum of completion times by the Lemma & the Observation
3/15
Explanation of Some Terms
Scheduling
Allocation of limited resources to the given set of jobs over time
Components of a Scheduling Problem Tasks/Jobs
Constraints
Resources
Objective/Goal
Single Machine
Only one resource available for the processing of tasks/jobs
4/15
Explanation of Some Terms (contd.)
Nonpreemptive
In which a running job can be interrupted before the completion
of a Job or
For starting another Job
Preemptive
Running Job is executed till Completion of that job
For delaying to complete Jobs with higher priority
Nonpreemtive Job can not be interrupted
5/15
Problem of Scheduling Job on a Single Machine
Constraints
Inputs
A schedule for jobs on a single machine is to be constructed such that ;
Number of Jobs ๐
Release Date i.e., The time of arrival of job in the scheduling system ๐๐
Processing Time i.e., The time for which job executes on a machine ๐๐
(i) At most One Job is processed at each point in time
(ii) No Job is processed before its release date
(iii) Each Job must be processed nonpreemptively
6/15
Problem of Scheduling Job on a Single Machine (contd.)
Objective
Find the schedule that minimizes ,
Completion Time i.e., The time at which Job j finished its processing
C๐
C๐
๐
๐=1
The Problem of Minimizing the Average Completion Time
Equivalent to
because
The Average Completion Time just rescales the objective function for each
๐/๐ feasible solution by a factor of
7/15
Example of Nonpreemptive Schedule
Job No. Processing
Time (p) Release
Date (r)
Job1 2 0
Job2 1 4
Job3 4 1
Completion
Time (C)
2
5
9
Job 1 Job 2 Job 3
0 4 2 5 9 Time
C๐ ๐
= 2 + 5 + 9
= 16
8/15
Shortest Remaining Processing Time (SRPT) Rule
An Optimal Solution to the Preemptive version of the scheduling problem can be found in polynomial time via
SRPT rule.
(i) Starting at time 0 and schedule the job with the smallest amount of remaining processing time as long as the job is past its release date &
have not been already completed
(ii) Scheduling the job until either it is completed or a new job is released
(iii) Iterating the process
9/15
Job No. Processing
Time (p) Release
Date (r)
Job1 2 0
Job2 1 4
Job3 4 1
Completion
Time (C)
2
5
7
Job 1 Job 2 Job 3
0 4
Job 3
2 5 7 Time
C๐ ๐
= 2 + 5 + 7
= 14
Example of Preemptive Schedule using SRPT rule
Note: The Processing of
job1 is not interrupted when
job3 arrives at time 1
10/15
Observation: 4.1
๐ถ๐๐ ๐
๐=1 โค OPT
The Completion time of job j in an optimal preemptive schedule ๐ถ๐๐
Let,
OPT The Sum of Completion time in an optimal nonpreemptive schedule
the fact that an Optimal Nonpreemptive Schedule is feasible for the Preemptive
Scheduling problem
Observation
Proved by
11/15
Scheduling Algorithm
Now, Considering this Scheduling Algorithm a Lemma is to be proved.
(i) Finding an optimal preemptive schedule using SRPT
(ii) Scheduling the job nonpreemptively in the same order that they complete in this preemptive schedule
Example ๐ถ1๐
๐ถ2๐
๐ถ๐๐
โค โค โฆ โค
(i) Schedule Job1 from its release date ๐๐ ๐ก๐ ๐ก๐๐๐ (๐๐+ ๐๐)
(ii) Schedule Job2 as soon as possible after Job1 ; i.e., max(๐๐+ ๐๐, ๐๐) to max(๐๐+ ๐๐, ๐๐) + ๐๐
๐๐๐ ๐ช๐๐ต Job j is processed from max *๐ช๐โ๐
๐ต , ๐๐+ ๐ก๐ max *๐ช๐โ๐๐ต , ๐๐+ + ๐๐
12/15
Lemma: 4.2
Proof
Consequently, in the time interval from ๐๐๐๐=๐,โฆ,๐
๐๐ to ๐ช๐๐ต , there
can not be any point in time at which machine is idle.
๐๐๐ ๐๐๐โ ๐๐๐ ๐ = 1,โฆ , ๐ ๐ถ๐๐ โค 2๐ถ๐
๐
As, ๐ is processed in the optimal preemptive schedule after jobs1,โฆ , ๐ โ 1
& ๐ช๐๐ท โฅ ๐๐๐๐=๐,โฆ,๐
๐๐ ๐ช๐๐ท โฅ ๐๐
๐
๐=1
๐ช๐๐ต โฅ ๐๐๐๐=๐,โฆ,๐
๐๐
So,
Therefore, ๐ช๐๐ต โค ๐๐๐
๐=๐,โฆ,๐๐๐ + ๐๐
๐๐=1 โค ๐๐ช๐
๐ท
13/15
Theorem: 4.3
Therefore,
๐๐๐๐ ๐ณ๐๐๐๐ ๐. ๐ ๐ถ๐๐ โค 2๐ถ๐
๐
& ๐๐๐๐ ๐ถ๐๐๐๐๐๐๐๐๐๐ ๐. ๐ โค ๐ถ๐
๐
๐
๐=1
OPT
2 ๐ถ๐๐
๐
๐=1
๐ถ๐๐
๐
๐=1
โค โค 2 OPT
Concluding Remark Scheduling in order of the completion times of an optimal preemptive schedule is a 2-approximation
algorithm for scheduling a single machine with release dates to minimize the sum of completion times.
14/15