Scheduling Lecture 1: Scheduling on One Machine

Similar documents
Scheduling Lecture 1: Scheduling on One Machine

Embedded Systems 15. REVIEW: Aperiodic scheduling. C i J i 0 a i s i f i d i

Real-time operating systems course. 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm

Task Models and Scheduling

Simple Dispatch Rules

Embedded Systems 14. Overview of embedded systems design

Embedded Systems - FS 2018

Paper Presentation. Amo Guangmo Tong. University of Taxes at Dallas January 24, 2014

Lecture 13. Real-Time Scheduling. Daniel Kästner AbsInt GmbH 2013

Single Machine Problems Polynomial Cases

RCPSP Single Machine Problems

Networked Embedded Systems WS 2016/17

Real-Time Systems. Event-Driven Scheduling

Real-Time Systems. Lecture 4. Scheduling basics. Task scheduling - basic taxonomy Basic scheduling techniques Static cyclic scheduling

Embedded Systems Development

Lecture 2: Scheduling on Parallel Machines

There are three priority driven approaches that we will look at

Recoverable Robustness in Scheduling Problems

Clock-driven scheduling

CIS 4930/6930: Principles of Cyber-Physical Systems

Andrew Morton University of Waterloo Canada

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

Real-Time Systems. Event-Driven Scheduling

Algorithm Design. Scheduling Algorithms. Part 2. Parallel machines. Open-shop Scheduling. Job-shop Scheduling.

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #7: More on Uniprocessor Scheduling

Real-time Systems: Scheduling Periodic Tasks

Aperiodic Task Scheduling

Single Machine Scheduling with Generalized Total Tardiness Objective Function

Single Machine Models

Real-Time and Embedded Systems (M) Lecture 5

Non-Preemptive and Limited Preemptive Scheduling. LS 12, TU Dortmund

Minimizing Mean Flowtime and Makespan on Master-Slave Systems

Real-time Scheduling of Periodic Tasks (2) Advanced Operating Systems Lecture 3

EDF Feasibility and Hardware Accelerators

CPU SCHEDULING RONG ZHENG

Scheduling. Uwe R. Zimmer & Alistair Rendell The Australian National University

Algorithm Design and Analysis

Real-time Scheduling of Periodic Tasks (1) Advanced Operating Systems Lecture 2

Partition is reducible to P2 C max. c. P2 Pj = 1, prec Cmax is solvable in polynomial time. P Pj = 1, prec Cmax is NP-hard

P C max. NP-complete from partition. Example j p j What is the makespan on 2 machines? 3 machines? 4 machines?

Deterministic Models: Preliminaries

Scheduling with Constraint Programming. Job Shop Cumulative Job Shop

CMSC 451: Lecture 7 Greedy Algorithms for Scheduling Tuesday, Sep 19, 2017

On Two Class-Constrained Versions of the Multiple Knapsack Problem

Design of Real-Time Software

Combinatorial Structure of Single machine rescheduling problem

On the Soft Real-Time Optimality of Global EDF on Multiprocessors: From Identical to Uniform Heterogeneous

A Theory of Rate-Based Execution. A Theory of Rate-Based Execution

CSE101: Design and Analysis of Algorithms. Ragesh Jaiswal, CSE, UCSD

Optimal Utilization Bounds for the Fixed-priority Scheduling of Periodic Task Systems on Identical Multiprocessors. Sanjoy K.

Real-Time Scheduling and Resource Management

Proportional Share Resource Allocation Outline. Proportional Share Resource Allocation Concept

Real-Time Systems. LS 12, TU Dortmund

Simulation. Stochastic scheduling example: Can we get the work done in time?

Batch delivery scheduling with simple linear deterioration on a single machine 1

CSE 380 Computer Operating Systems

RUN-TIME EFFICIENT FEASIBILITY ANALYSIS OF UNI-PROCESSOR SYSTEMS WITH STATIC PRIORITIES

Energy-efficient scheduling

Resource Management in Machine Scheduling Problems: A Survey

Probabilistic real-time scheduling. Liliana CUCU-GROSJEAN. TRIO team, INRIA Nancy-Grand Est

Online Appendix for Coordination of Outsourced Operations at a Third-Party Facility Subject to Booking, Overtime, and Tardiness Costs

Energy-efficient Mapping of Big Data Workflows under Deadline Constraints

Bi-criteria Scheduling Problems on Parallel Machines

On Machine Dependency in Shop Scheduling

Process Scheduling for RTS. RTS Scheduling Approach. Cyclic Executive Approach

Scheduling and fixed-parameter tractability

Scheduling divisible loads with return messages on heterogeneous master-worker platforms

CSE 421 Greedy Algorithms / Interval Scheduling

Metode şi Algoritmi de Planificare (MAP) Curs 2 Introducere în problematica planificării

Deterministic Scheduling. Dr inż. Krzysztof Giaro Gdańsk University of Technology

Priority-driven Scheduling of Periodic Tasks (1) Advanced Operating Systems (M) Lecture 4

Non-Work-Conserving Non-Preemptive Scheduling: Motivations, Challenges, and Potential Solutions

Task assignment in heterogeneous multiprocessor platforms

Greedy Homework Problems

An Optimal Real-Time Scheduling Algorithm for Multiprocessors

Open Problems in Throughput Scheduling

Rate-monotonic scheduling on uniform multiprocessors

arxiv:cs/ v1 [cs.ds] 18 Oct 2004

Minimizing total weighted tardiness on a single machine with release dates and equal-length jobs

CHAPTER 16: SCHEDULING

Scheduling jobs with agreeable processing times and due dates on a single batch processing machine

Polynomial Time Algorithms for Minimum Energy Scheduling

Common-Deadline Lazy Bureaucrat Scheduling Problems

Multiprocessor Real-Time Scheduling Considering Concurrency and Urgency

CS 374: Algorithms & Models of Computation, Spring 2017 Greedy Algorithms Lecture 19 April 4, 2017 Chandra Chekuri (UIUC) CS374 1 Spring / 1

Real-Time Scheduling

Single Machine Scheduling: Comparison of MIP Formulations and Heuristics for. Interfering Job Sets. Ketan Khowala

Ideal preemptive schedules on two processors

Polynomial time solutions for scheduling problems on a proportionate flowshop with two competing agents

Multiprocessor Scheduling I: Partitioned Scheduling. LS 12, TU Dortmund

EDF Scheduling. Giuseppe Lipari May 11, Scuola Superiore Sant Anna Pisa

A New Sufficient Feasibility Test for Asynchronous Real-Time Periodic Task Sets

CSE 417. Chapter 4: Greedy Algorithms. Many Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

TDDI04, K. Arvidsson, IDA, Linköpings universitet CPU Scheduling. Overview: CPU Scheduling. [SGG7] Chapter 5. Basic Concepts.

Dependency Graph Approach for Multiprocessor Real-Time Synchronization. TU Dortmund, Germany

Greedy Algorithms. Kleinberg and Tardos, Chapter 4

Using column generation to solve parallel machine scheduling problems with minmax objective functions

arxiv: v1 [cs.ds] 29 Jul 2014

Scheduling communication requests traversing a switch: complexity and algorithms

Minimizing the Number of Tardy Jobs

Transcription:

Scheduling Lecture 1: Scheduling on One Machine Loris Marchal 1 Generalities 1.1 Definition of scheduling allocation of limited resources to activities over time activities: tasks in computer environment, steps of a construction project, operations in a production process, lectures at the University, etc. tasks, jobs, resources: processors, workers, machines, lecturers, rooms, etc. processors, machines objective: minimize total time, energy consumption, average service time Many variations on the model, on the resource/activity interaction and on the objective. Typical example: organize production of a workshop, by making a schedule for machines. Making different objects may need different series of machines, with different processing time. The number of objects of each type (or the ratio) may be fixed, and we want to minimize the overall processing time (or the throughput). Another example: in an airport, allocate gates to airplanes, arriving at different gates, not all gates can accomodate all planes, some gates are further than others: how to minimize the time spent by passengers (taxiing and walking in the terminal). Other examples: schedule the activity of workers in a construction process, allocate rooms for lecture at the University, etc. Our context: in a computing system, we have a number of machines at hand. These machines may be close to each other, or linked with a limited communication network. We want to use this platform to execute an application, composed of several tasks. Tasks may have precedence constraints, or other type of constraints. Several users may share the platform, which might be widely distributed, or hierarchical. 1

1.2 Graham notation Classes of scheduling problems can be specified in terms of the three-field classification α β γ where α specifies the machine environment, β specifies the job characteristics, γ and describes the objective function(s). We will illustrate this notation on all following scheduling problems. 2 Scheduling with a single machine Motivations: understand the complexity of the problem for various objectives some of actual systems offers flexibility and may well be modeled by a single machine (e.g. virtual machines) practice usual scheduling techniques 2.1 First example, with new objective, 1 w i C i, polynomial (Smith-ratio) Objectives using C i : Makespan C max = max C i most common objective Total flow time: n j=1 C j Weighted (total) flow time: n j=1 w jc j Let us consider the problem: 1 w i C i, 1 machine no constraints on tasks (length p i ) Objective: weighted sum of completion times Intuitions: put high weight first put longer tasks last Order task by non-increasing Smith ratio: w 1 /p 1 w 2 /p 2 w n /p n Proof: 2

Consider a different optimal schedule S Let i and j be two consecutive tasks in this schedule such that w i /p i < w j /p j contribution of these tasks in S: S i = (w i + w j )(t + p i ) + w j p j contribution of these tasks if switched: S j = (w i + w j )(t + p j ) + w i p i we have S i S j w i w j = p i w i p j w j Thus we decrease the objective by switching these tasks. 2.2 Adding due-dates Other objectives in the Graham notations, using due dates d j ((sometimes) appears in the job characteristics): lateness: L j = C j d j tardiness: T j = max{0, C j d j } unit penalty: U j = 0 if C j d j, 1 otherwise wich gives the following objectives: (total lateness=sum flow) maximum lateness: L max = max L j total tardiness T j total weighted tardiness w j T j number of late activities U j weighted number of late activities w j U j 2.2.1 EDF for 1 L max Let s study the problem 1 L max : minimize the maximum lateness on one machine. The strategy which places first the jobs with the earliest deadlines is optimal (Earliest Deadline First). See details in http://www.seas.upenn.edu/~deepc/courses/co454/lectures/ lecture5.pdf. 3

2.2.2 Moore-Hodgson algorithm for 1 U i Example: job 1 2 3 4 5 d j 6 7 8 9 11 p j 4 3 2 5 6 Tasks are sorted by non-decreasing d i : d 1 d n A := For i = 1... n If p(a) + p i d i, then A := A {i} Otherwise, Let j be the longest task in A {i} A := A {i} {j} Optimal solution : A = {2, 3, 5} Proof. Feasibility: We first prove that the algorithm produces a feasible schedule, that is, all task of A can be scheduled in this order without missing their deadline By induction: if no task is rejected, ok Assume that A is feasible, prove that A {i} {j} is feasible too Optimality: all tasks in A before j: no change all tasks in A after j: shorter completion task i: let k be the last task in A: p(a) d k since task j is the longest: p i p j, thus p(a {i} {j}) p(a) d k d i (because tasks are sorted) That is, the new task i terminates earlier than k before j was rejected. Since d i d k, this is enough. Assume that there exists an optimal set O different from the set A f output by the Moore-Hodgson algorithm Let j be the first task rejected by the algorithm We prove that there exists an optimal solution without j We consider the set A = {1,..., i 1} at the moment when task j is rejected from A, and i the task being added at this moment A + i is not feasible, thus O does not contain {1,..., i} Let k be a task of {1,..., i} which is not in O 4

Since the algorithm rejects the longest task, p(o {k} {j}) p(o), and by the same arguments than before, O {k} {j} is feasible We can suppress j from the problem instance, without modifying the behavior of the algorithm or the objective We can repeat this process, until we get the set of tasks scheduled by the algorithm. 2.3 Adding release dates, 1 r i C i All jobs are not released at the same time, but job j is available starting at time r j. 1 r i C i is NP-complete (admitted) When adding preemption, we can derive an optimal algorithm for 1 r i, pmtb C i, which serves as a basis for a 2-approximation algorithm for the initial problem. See details in http://www.seas.upenn.edu/~deepc/courses/co454/lectures/lecture4. pdf. 5