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.

Slides:



Advertisements
Similar presentations
The Law of Total Probability
Advertisements

Math for Liberal Studies. There is a list of numbers called weights These numbers represent objects that need to be packed into bins with a particular.
1 EE5900 Advanced Embedded System For Smart Infrastructure RMS and EDF Scheduling.
Chapter 3: Planning and Scheduling Lesson Plan
Evaluating Heuristics for the Fixed-Predecessor Subproblem of Pm | prec, p j = 1 | C max.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. Scheduling with Independent Tasks Notes 9 – Section 8.7.
Chapter 8: Scheduling “Science is organized knowledge. Wisdom is organized life.” -Immanuel Kant.
Point-and-Line Problems. Introduction Sometimes we can find an exisiting algorithm that fits our problem, however, it is more likely that we will have.
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.
Module 5 – Networks and Decision Mathematics Chapter 24 – Directed Graphs.
Merge Sort 4/15/2017 6:09 PM The Greedy Method The Greedy Method.
1 Greedy Algorithms. 2 2 A short list of categories Algorithm types we will consider include: Simple recursive algorithms Backtracking algorithms Divide.
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
1 The Greedy Method CSC401 – Analysis of Algorithms Lecture Notes 10 The Greedy Method Objectives Introduce the Greedy Method Use the greedy method to.
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.
Blaise Pascal Born: June 19, 1623 Clermont Auvergne, France
Lecture 2 Geometric Algorithms. A B C D E F G H I J K L M N O P Sedgewick Sample Points.
VOLTAGE SCHEDULING HEURISTIC for REAL-TIME TASK GRAPHS D. Roychowdhury, I. Koren, C. M. Krishna University of Massachusetts, Amherst Y.-H. Lee Arizona.
Key Stone Problem… Key Stone Problem… next Set 22 © 2007 Herbert I. Gross.
CPU-Scheduling Whenever the CPU becomes idle, the operating system must select one of the processes in the ready queue to be executed. The short term scheduler.
 Jim has six children.  Chris fights with Bob,Faye, and Eve all the time; Eve fights (besides with Chris) with Al and Di all the time; and Al and Bob.
X of Z: MAJOR LEAGUE BASEBALL ATTENDANCE Rather than solving for z score first, we may be given a percentage, then we find the z score, then we find the.
Critical Path Analysis
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling.
Graphs Their Applications. NC Standard Course of Study Competency Goal 1: The learner will use matrices and graphs to model relationships and solve problems.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 01, 2005 Session 14.
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.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
Spring 2015 Mathematics in Management Science Critical Path Scheduling Critical Paths & Times Backflow Algorithm Critical Times PL Critical Path Algorithm.
Chapter 3 Fair Division.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 15 Graph Theory.
Parallel Machine Scheduling
Example 5.10 Project Scheduling Models | 5.2 | 5.3 | 5.4 | 5.5 | 5.6 | 5.7 | 5.8 | 5.9 | 5.10a a Background Information.
1 Real-Time Scheduling. 2Today Operating System task scheduling –Traditional (non-real-time) scheduling –Real-time scheduling.
CSEP 521 Applied Algorithms Richard Anderson Winter 2013 Lecture 3.
Bushy Binary Search Tree from Ordered List. Behavior of the Algorithm Binary Search Tree Recall that tree_search is based closely on binary search. If.
Multithreading The objectives of this chapter are: To understand the purpose of multithreading To describe Java's multithreading mechanism.
Critical Paths and Scheduling Tasks Circuits, Paths, and Schedules.
Unit 3 Scheduling and Planning. Literacy Practice Please read PG Stop at ASSUMPTIONS AND GOALS on page 68.
Critical Path Scheduling (Txt: 8.5 & SOL: DM.10) CLASSWORK (DAY 30) EXAMPLE IN CLASS HOMEWORK (DAY 30): WORKSHEET DAY 30 QUIZ NEXT BLOCK.
Vectors Physics 1 st Six Weeks. Vectors vs. Scalars.
Chapter 3: Planning and Scheduling. Planning and Scheduling - Topics Resolving Conflict via Coloring Bin Packing Scheduling Tasks Critical-Path Schedules.
Excursions in Modern Mathematics Sixth Edition
8 The Mathematics of Scheduling
Greedy Algorithms.
Project Scheduling Models
ITEC 202 Operating Systems
Scheduling Theory By Sarah Walker 12/4/2018.
TDC 311 Process Scheduling.
Solutions Markov Chains 1
Advanced Analysis of Algorithms
Managing Sessions in PearsonAccessnext
3.1 Earliest Start Times.
Planning and Scheduling
Planning and Scheduling
Managing Sessions in PearsonAccessnext
Managing Sessions in PearsonAccessnext
List Processing (SOL: DM.10)
Managing Sessions in PearsonAccessnext
Managing Sessions in PearsonAccessnext
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.
Richard Anderson Autumn 2015 Lecture 7
Chapter 3: Planning and Scheduling Lesson Plan
A general method for solving problems involving forces
Managing Sessions in PearsonAccessnext
Richard Anderson Autumn 2019 Lecture 8 – Greedy Algorithms II
Presentation transcript:

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 can be machines, robots, humans, or a combination of any of these, depending on the job.  Each task is associated with an amount of time that is required to complete the tasks.  In addition, some tasks will need to be complete before others.  The problem is scheduling: which processor should work on which job at which time?

 To simplify the problem, we will make some assumptions.  If a processor starts a task, it will work on that task until the task is complete.  No processor will be voluntarily idle: if there is a processor free and a task ready, that processor will immediately begin work on that task.  There is an order-requirement graph that indicates which tasks must be completed before others.  The tasks are arranged in a priority list that is independent of the order requirements. The priority list indicates which tasks are “most important” and is used to break ties when multiple tasks are ready at a given time.

 Usually, the goal of the scheduling problem is to schedule the processors so that all tasks are complete as early as possible.  However, sometimes we will be interested in minimizing idle time, or minimizing the number of processors needed to finish all tasks by a given deadline.

 Consider the order-requirement graph shown below. There are 8 tasks to be completed.  Suppose there are 2 processors, and the priority list is T 8, T 7, T 6, …, T 1, so that T 8 is the most important task, and T 1 is the least important Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4

 The job starts at time 0. There are two processors, and both are available. Processor 1 gets to choose first, but it needs to choose a ready task.  Tasks 1, 7, and 8 are ready, since they have no prerequisites. The other tasks are not ready since their prerequisites have not been completed Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4

 Which of the three ready tasks should Processor 1 work on? Task 8 comes first on the priority list, so it is the most important. Processor 1 chooses Task 8.  Processor 2 is also available at time 0. Task 8 has already been chosen, so Processor 2 chooses the ready task with the highest priority: Task Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4

 In order to keep track of which tasks have been completed at any given time, we draw a timeline.  Whenever a processor performs a task, we draw a box labeled with the task name on that processor’s line.  The left side of the box is lined up with the start time on the timeline, and the right side is lined up with the end time. 0 Processor 1 Processor 2

75  Processor 1 works on Task 8 from time 0 to time 7.  Processor 2 works on Task 7 from time 0 to time 5.  In our diagrams, red tasks are being worked on, grey tasks are complete, and green tasks have not yet begun Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task Processor 1 Processor 2 Task 8 Task 7

8 7  At time 5, Processor 2 is available. The only ready task is Task Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task Processor 1 Processor 2 Task 8 Task 7Task 1 5

8 75  At time 7, Processor 1 becomes available. However, there is no ready task! Task 2 is not ready because task 1 must be complete before Task 2 can begin Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task Processor 1 Processor 2 Task 8 Task 7Task 1

68 75  At time 13, both processors are available, and Task 2 is ready. Processor 1 gets to choose first, and works on Task 2. However, there is no other remaining task for Processor Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task Processor 1 Processor 2 Task 8 Task 7Task 1 Task 2

 At time 19, Task 2 is complete, and both processors are available. Tasks 3 and 5 are ready, and Processor 1 gets first pick. Since Task 5 is more important, Processor 1 chooses it. Processor 2 works on Task Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task Processor 1 Processor 2 Task 8 Task 7Task 1 Task 2 28

 At time 24, Processor 1 completes Task 5. Task 6 is the only ready task, so Processor 1 begins work on it. 4 Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 5 Task 6 Task Processor 1 Processor 2 Task 8 Task 7Task 1 Task

 At time 27, Processor 1 completes Task 6. Since Task 3 still is not complete, Task 4 is not ready, so Processor 1 must be idle. 4 Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 5 Task 6 Task Processor 1 Processor 2 Task 8 Task 7Task 1 Task

 At time 28, Processor 2 completes Task 3, and both processors are available.  Processor 1 gets to choose first, and chooses the only task remaining: Task 4. Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 5 Task 6 Task Processor 1 Processor 2 Task 8 Task 7Task 1 Task

 At time 32, all tasks are complete! Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 5 Task 6 Task Processor 1 Processor 2 Task 8 Task 7Task 1 Task

 You may have noticed that our solution had a lot of idle time. Since we were following the priority list, we were forced to complete the tasks in that order.  However, watch what happens when we use a different priority list: T 1, T 2, T 3, …, T 8.

Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task Processor 1 Processor 2 Task 1 Task 7

Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task Processor 1 Processor 2 Task 1 Task 7 12

Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 2 Task Processor 1 Processor 2 Task 1 Task

Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 2 Task Processor 1 Processor 2 Task 1 Task

Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 3 Task 5 Task 2 Task Processor 1 Processor 2 Task 1 Task

Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 6 Task 3 Task 5 Task 2 Task Processor 1 Processor 2 Task 1 Task

Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 6 Task 3 Task 5 Task 2 Task Processor 1 Processor 2 Task 1 Task

Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 6 Task 3 Task 5 Task 2 Task Processor 1 Processor 2 Task 1 Task

Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4 Task 6 Task 3 Task 5 Task 2 Task Processor 1 Processor 2 Task 1 Task

 This method for assigning tasks is known as the list- processing algorithm. The basic rule for the algorithm is: ◦ At any given time, assign to a processor the first task on the priority list that is ready.

 Note that the critical path (indicated in red on the diagram) has a total length of 27 time units. This means that all eight tasks could not have been completed in less than 27 time units, no matter how many processors we use Task 7Task 8 Task 1 Task 2 Task 5Task 6 Task 3Task 4