Spring 2015 Mathematics in Management Science Critical Path Scheduling Critical Paths & Times Backflow Algorithm Critical Times PL Critical Path Algorithm.

Slides:



Advertisements
Similar presentations
Excursions in Modern Mathematics Sixth Edition
Advertisements

CALTECH CS137 Fall DeHon 1 CS137: Electronic Design Automation Day 19: November 21, 2005 Scheduling Introduction.
§3 Shortest Path Algorithms Given a digraph G = ( V, E ), and a cost function c( e ) for e  E( G ). The length of a path P from source to destination.
© J. Christopher Beck Lecture 17: Tabu Search.
Chapter 3: Planning and Scheduling Lesson Plan
Evaluating Heuristics for the Fixed-Predecessor Subproblem of Pm | prec, p j = 1 | C max.
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 14: March 3, 2004 Scheduling Heuristics and Approximation.
Chapter 8: Scheduling “Science is organized knowledge. Wisdom is organized life.” -Immanuel Kant.
Critical Paths and Critical Paths Algorithm Notes 8 – Sections 8.5 & 8.6.
§2 Topological Sort 〖 Example 〗 Courses needed for a computer science degree at a hypothetical university How shall we convert this list into a graph?
SCHEDULING Critical Activities are: B, F, I, M, Q.
Scheduling Two people are camping out and wish to cook a simple supper consisting of soup and hamburgers. In order to prepare the supper, several tasks.
1 Greedy Algorithms. 2 2 A short list of categories Algorithm types we will consider include: Simple recursive algorithms Backtracking algorithms Divide.
The Mathematics of Scheduling Chapter 8. How long does it take to build a house? It depends on Size of the house Type of construction Number of workers.
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
EDA (CS286.5b) Day 11 Scheduling (List, Force, Approximation) N.B. no class Thursday (FPGA) …
A. Frank - P. Weisberg Operating Systems CPU Scheduling.
1 IOE/MFG 543 Chapter 7: Job shops Sections 7.1 and 7.2 (skip section 7.3)
Sequencing Problem.
A processor is a person, machine, computer, or robot etc., which works on a task. To solve a scheduling problem typically the tasks are scheduled to minimize.
CRITICAL PATH DEFINITION.  ALL the tasks that determine the end date in your project schedule.  The critical path is the longest PATH, through the “AON”
Shortest Path. Dijkstra’s Algorithm finds the shortest path from the start vertex to every other vertex in the network. We will find the shortest path.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Chapter 6: CPU Scheduling
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-3 CPU Scheduling Department of Computer Science and Software Engineering.
Chapter 6 CPU SCHEDULING.
Critical Path Analysis
CALTECH CS137 Winter DeHon CS137: Electronic Design Automation Day 12: February 13, 2002 Scheduling Heuristics and Approximation.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling.
Planning and Scheduling Chapter 3 Jennifer Holland February 2, 2010.
Spring 2015 Mathematics in Management Science Machine Scheduling Problem Statement of MSP Assumptions & Goals Priority Lists List Processing Algorithm.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling.
Spring 2015 Mathematics in Management Science Independent Tasks Scheduling Idpt Tasks Optimal Schedules Reducing FinTime.
Priority Queues Two kinds of priority queues: Min priority queue. Max priority queue. Nov 4,
Mathematics in Management Science
CSEP 521 Applied Algorithms Richard Anderson Winter 2013 Lecture 3.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling.
Planning and Scheduling.  A job can be made up of a number of smaller tasks that can be completed by a number of different “processors.”  The processors.
Critical Paths and Scheduling Tasks Circuits, Paths, and Schedules.
Copyright © Curt Hill More on Operating Systems Continuation of Introduction.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
1 Job Shop Scheduling. 2 Job shop environment: m machines, n jobs objective function Each job follows a predetermined route Routes are not necessarily.
CSC317 1 At the same time: Breadth-first search tree: If node v is discovered after u then edge uv is added to the tree. We say that u is a predecessor.
Chapter 3: Planning and Scheduling. Planning and Scheduling - Topics Resolving Conflict via Coloring Bin Packing Scheduling Tasks Critical-Path Schedules.
8 The Mathematics of Scheduling
Greedy Algorithms.
8 The Mathematics of Scheduling
Excursions in Modern Mathematics Sixth Edition
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Shortest Path.
Shortest Path.
Scheduling Theory By Sarah Walker 12/4/2018.
Chapter5: CPU Scheduling
Advanced Analysis of Algorithms
Chapter 6: CPU Scheduling
Richard Anderson Lecture 6 Greedy Algorithms
Planning and Scheduling
Richard Anderson Lecture 7 Greedy Algorithms
Planning and Scheduling
Shortest Path.
List Processing (SOL: DM.10)
Shortest-Job-First (SJR) Scheduling
Richard Anderson Winter 2019 Lecture 7
Warm Up – 3/25 - Tuesday Bill is taking a sales trip starting in Atlanta. Draw a graph that represents this table. Find the nearest neighbor tour from.
Warm Up – 3/27 - Thursday Write a priority list using the decreasing time algorithm. Do you see any problem with this?
Richard Anderson Autumn 2015 Lecture 7
Chapter 3: Planning and Scheduling Lesson Plan
Richard Anderson Autumn 2019 Lecture 7
Presentation transcript:

Spring 2015 Mathematics in Management Science Critical Path Scheduling Critical Paths & Times Backflow Algorithm Critical Times PL Critical Path Algorithm

Machine Scheduling Problem Given identical processors project digraph –tasks with task times –order (precedence) relations Schedule Schedule tasks so as to finish project in as short a time as possible.

Machine Scheduling Problem MSP MSP To schedule tasks so as to finish project in as short a time as possible. LPA LPA Given project digraph & PL, schedule the next ready task on the next available processor. DTA DTA Get PL by sorting task times in decreasing order; then use LPA.

List Processing Algorithm Given project digraph & PL Schedule the next ready task on the next available processor. next task is highest priority one next available proc is first idle one Tasks are in one of 4 states: ineligible, ready, executing, done.

List Processing Algorithm Schedule the next ready task on the next available processor.

List Processing Algorithm 1. Use digraph: update status of all tasks on PL. 2. Scan PL from L to R: stop at first Ready task. 3. Assign task to lowest-numbered free processor. 4. Mark this task as In Execution. 5. Continue assigning ready tasks until either all ready tasks have been assigned or there are no more free processors. (Time frozen while this cycle of assignments is made.) 6. Let time evolve until a task (or tasks) completes; so now have a free processor (or processors). 7. Mark Completed tasks on PL & digraph. 8. Repeat.

List Processing Algorithm Tasks only “executed” while clock is running. Scheduling only happens when clock is stopped. What stops the clock is a task completing. When clock stops scheduler takes “action”. The “action” summarized in three parts: Clean up: Remove completed tasks from PL and digraph. Prep: Find all Ready tasks (use digraph); update PL. Schedule: Schedule next ready task on next available proc.

Example Schedule pixd job on 2 processors. Use PL T8, T7, T6, T5, T4, T3, T2, T1

Example Schedule pixd job on 2 processors. Use PL T1, T2, T3, T4, T5, T6, T7, T8

With T8, T7, T6, T5, T4, T3, T2, T1 With PL T1, T2, T3, T4, T5, T6, T7, T8

Different priority lists usually give different schedules with different finish times. Are either of above schedules “optimal”? What does “optimal” mean? Here it means the shortest completion time among all possible (i.e., legal) schedules. Any (legal) schedule can be obtained from the list-processing algorithm by choosing some appropriate priority list.

Finding A Schedule

Optimal Schedules A schedule is optimal if it has the shortest possible completion time. To find via Brute Force Method Look at all possible schedules; obtain via PLSA using all possible priority lists. The schedules with the shortest completion time are the optimal schedules.

Finding Good Priority Lists Want PL that yields optimal (or nearly optimal) schedule. Use Decreasing Time Algorithm, or Critical Times Algorithm. These algorithms first give PL; then use LPA to get schedule.

Example Since ECT = 4 better schedule is optimal. DTA sched  FinT=6better sched  FinT=4

Optimal Finishing Time OptFinTime is the smallest possible time it takes to finish overall project; cannot do better than this. ECT is the length of a critical path: ECT=length of critical path A critical path is a path, from Start to End, with the longest processing time. We always have OptFinTime ≥ ECT.

Example 0 Start 0 End ECT=14 CritPath S  C  E  F  E OptFinTime ≥ ECT

Critical Path Algorithm Ideas To get a schedule with FinT=OptFinT, tasks in any CP must be done asap. Any delay in starting one of these “critical tasks” will increase the FinT of entire project. Thus want to put all “critical tasks” first in PL. How to get such a PL?

Critical Paths & Critical Times The processing time of a path is the sum of all task times in the path. A path from task T to End with the longest processing time is called a critical path for T. The critical time for T is processing time of any critical path for T.

Backflow Algorithm Simple way to determine all CritTimes. Once have these, can easily find all critical paths, critical times priority list. Once have CTPL, use LPA. How to get CritTimes ?

Backflow Algorithm Start at End and work back to Start. To get CritTime for task T, add T’s task time to largest of the CritTimes for the tasks which follow T. 0 Start 0 End

Example 0 Start 0 End

Example Critical Times CTPL C, B, A, E, D, F [7][7] [9][9] [14] [5][5] [6][6] [1][1]

Critical Paths Critical paths are found by going to next task with largest critical time. The critical path from task T (cud be Start) is obtained by moving from T to any adjacent task with largest critical time, and from there to next task with largest critical time, and so on.

Critical Path Priority Lists Use critical times rather than task times to prioritize the tasks. We get a critical times priority list by writing the tasks in decreasing order of critical times. The process of creating a schedule using a critical times priority list is called the Critical Path Algorithm.

Critical Path Algorithm Use LPA with CTPL. Find all CritTimes; Backflow! Generate CritTimesPL. Use LPA.

Example critical times CTPL

Example Critical Times CTPL C, B, A, E, D, F [7][7] [9][9] [14] [5][5] [6][6] [1][1]

Example 0 Start 0 End