Spring 2015 Mathematics in Management Science Machine Scheduling Problem Statement of MSP Assumptions & Goals Priority Lists List Processing Algorithm.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Excursions in Modern Mathematics Sixth Edition
ECE 667 Synthesis and Verification of Digital Circuits
Scheduling Criteria CPU utilization – keep the CPU as busy as possible (from 0% to 100%) Throughput – # of processes that complete their execution per.
Chapter 3: Planning and Scheduling Lesson Plan
Evaluating Heuristics for the Fixed-Predecessor Subproblem of Pm | prec, p j = 1 | C max.
1.1 Data Structure and Algorithm Lecture 6 Greedy Algorithm Topics Reference: Introduction to Algorithm by Cormen Chapter 17: Greedy Algorithm.
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.
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 2 Priority Driven Scheduling of Periodic Task
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
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.
5: CPU-Scheduling1 Jerry Breecher OPERATING SYSTEMS SCHEDULING.
CPSC 411, Fall 2008: Set 4 1 CPSC 411 Design and Analysis of Algorithms Set 4: Greedy Algorithms Prof. Jennifer Welch Fall 2008.
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.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 7 The Mathematics of Networks 7.1Trees 7.2Spanning Trees 7.3 Kruskal’s.
Excursions in Modern Mathematics Sixth Edition
Chapter 6: CPU Scheduling
Chapter 6 CPU SCHEDULING.
MM Process Management Karrie Karahalios Spring 2007 (based off slides created by Brian Bailey)
Critical Path Analysis
Spring 2015 Mathematics in Management Science Bin Packing The Problem The Algorithms.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 8 The Mathematics of Scheduling 8.1The Basic Elements of Scheduling.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 01, 2005 Session 14.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms.
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.
Scheduling policies for real- time embedded systems.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
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.
Spring 2015 Mathematics in Management Science Critical Path Scheduling Critical Paths & Times Backflow Algorithm Critical Times PL Critical Path Algorithm.
5-1-1 CSC401 – Analysis of Algorithms Chapter 5--1 The Greedy Method Objectives Introduce the Brute Force method and the Greedy Method Compare the solutions.
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15.
Mathematics in Management Science
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 5 CPU Scheduling Slide 1 Chapter 5 CPU Scheduling.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
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.
1 Uniprocessor Scheduling Chapter 3. 2 Alternating Sequence of CPU And I/O Bursts.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
Scheduling.
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
8 The Mathematics of Scheduling
CPU SCHEDULING.
Excursions in Modern Mathematics Sixth Edition
Greedy Algorithms.
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
AQR Unit 7 Discrete Mathematics
Scheduling Theory By Sarah Walker 12/4/2018.
Critical Path Method Farrokh Alemi, Ph.D.
CPU SCHEDULING.
Process Scheduling B.Ramamurthy 2/23/2019.
Planning and Scheduling
Planning and Scheduling
List Processing (SOL: DM.10)
Module 5: CPU Scheduling
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.
Chapter 3: Planning and Scheduling Lesson Plan
Module 5: CPU Scheduling
Presentation transcript:

Spring 2015 Mathematics in Management Science Machine Scheduling Problem Statement of MSP Assumptions & Goals Priority Lists List Processing Algorithm

Machine Scheduling Problem To schedule tasks on processors to get job done as efficiently as possible. Two variations: –fixed # procs each with unlimited capacity (minimize total time) –unlimited # of procs each with fixed capacity (minimize total # used)

Basic Set Up Job consists of interdependent tasks; want good schedule. Use fixed number of processors. Order requirement digraph describes task times and order dependencies. In addition, often have priority list (PL) which gives ordering of the tasks.

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

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

Possible Goals Can try to minimize any one of: job completion time, or total time processors are idle, or number of processors necessary to finish the job by a specified time. Above may conflict with each other!

Example A-B is critical path ECT=18

Basic Set Up Job consists of interdependent tasks; want good schedule. Use fixed number of processors. Order requirement digraph describes task times and order dependencies. In addition, often have priority list (PL) which gives ordering of the tasks.

The Tasks Every large project has “jobs” or “tasks”. A task is an indivisible unit of work that cannot be broken up into smaller units. A task is always carried out by a single processor. We use capital letters A, B, C…, to represent the tasks. (Or, T 1,T 2,… )

Each task requires only one processor. Each processor can handle only one task at a time. When a processor starts a task, it will be completed without interruption. Any processor can work on any task. No processor stays idle voluntarily. Task Assumptions 11

The Tasks (continued) At any particular moment, a task can be in one of four possible states: Completed In Execution Ready Ineligible T T T T

Processing Times The processing time (or individual task time) for a task T is the amount of time required for one processor to execute T. The notation T(5) tells us that task T has a processing time of 5 units (minutes, hours, days, or any other unit of time).

Precedence Relations Precedence relations describe the order in which the tasks must be executed. Can’t begin task B until A is completed. Until A is completed, B is ineligible. Once A is completed, B is ready. If A is in execution, B is ineligible.

Directed Graphs Tasks and precedent info easily displayed via directed graphs (digraphs). A digraph (directed graph) is just a graph with arrows on its edges which correspond to order requirements. Vertices correspond to tasks, and we label them with weights (numbers) which give the processing times for each task.

Example

Example

Machine Scheduling Problem Decide how to schedule tasks on identical processors (machines, humans, robots, etc.) so as to finish a project in as short a time as possible. Will attack via List Processing Algorithm. Alternate problems available too!

Basic Set Up Project consists of interdependent tasks; want good schedule. Use fixed number of processors. Have order requirement digraph describing task times and their order dependencies. Often assume existence of a priority list (PL) – an ordering of the tasks.

Example P2P2 P1P1 FinT=18 IdleT=11 ECT=18

Example You just wrecked your car.  Your garage has two processors, P 1 & P 2. Four type of repairs necessary:  A exterior body work (4 hours),  B engine repairs (5 hours),  C painting (7 hours)  D repair transmission (3 hours). Only precedence relation is A  C.

Example Schedule (a) is very inefficient. All the short tasks are assigned to processor P 1 and all the long tasks to P 2.

Example Schedule (b) looks much better, but it violates the order relation A  C (we cannot start C until A is completed).

Example If we force P 2 to be idle for one hour, waiting to start task C, we get an OK schedule (c) with FinT = 11 hours.

Example Schedule (d) is another perfectly good one, again with FinT = 11 hours. Can we do better?

Example Can we beat FinT = 11 hours ? The precedence relation A(4)  C(7) implies that 11 hours is a minimum time barrier we cannot break. The schedules in (c) & (d) are optimal. 11 hours is earliest completion time. ECT = 11 hours

Priority Lists A list of all the tasks prioritized in the order we prefer to execute them. If X is before Y in the priority list, X gets priority over Y; given a choice between the two, X is executed ahead of Y. If X is not yet ready, we must skip it and move on to the first ready task after X in the priority list.

PL Scheduling 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.

Example PL A, B, C, D, E, F F 16 P2P2 P1P1 A B CD E FinT=16 IdleT=9 CritT=14

Finding A Schedule

Example PL A, B, C, D, E PL E, D, C, B, A CritT=12 P1P1 P2P2 P1P1 P2P2

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 A Schedule

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

Decreasing Time Algorithm “common sense” – do the longer tasks first & leave the shorter tasks for lastDTA Create PL by sorting task times in decreasing order. Must still get schedule; use PLSA.

Example F 14 P2P2 P1P1 AB C D E FinT=14 IdleT=5 task times 8, 5, 4, 3, 2, 1 PL C, E, D, B, A, F 8 CritT=14