Real-Time Systems. Multiprocessor scheduling. Multiprocessor scheduling. Multiprocessor scheduling

Similar documents
Real-Time Systems. Lecture #14. Risat Pathan. Department of Computer Science and Engineering Chalmers University of Technology

Embedded Systems. 4. Aperiodic and Periodic Tasks

EDF Scheduling for Identical Multiprocessor Systems

Last Time. Priority-based scheduling. Schedulable utilization Rate monotonic rule: Keep utilization below 69% Static priorities Dynamic priorities

Real-Time Operating Systems M. 11. Real-Time: Periodic Task Scheduling

Fixed-Priority Multiprocessor Scheduling with Liu & Layland s Utilization Bound

Fixed-Priority Multiprocessor Scheduling with Liu & Layland s Utilization Bound

AN EXTENDIBLE APPROACH FOR ANALYSING FIXED PRIORITY HARD REAL-TIME TASKS

Problem Set 9 Solutions

Module 9. Lecture 6. Duality in Assignment Problems

Parametric Utilization Bounds for Fixed-Priority Multiprocessor Scheduling

NP-Completeness : Proofs

Improved Worst-Case Response-Time Calculations by Upper-Bound Conditions

Simultaneous Optimization of Berth Allocation, Quay Crane Assignment and Quay Crane Scheduling Problems in Container Terminals

Resource-Efficient Scheduling Of Multiprocessor Mixed-Criticality Real-Time Systems

EEL 6266 Power System Operation and Control. Chapter 3 Economic Dispatch Using Dynamic Programming

Scheduling Motivation

Quantifying the Sub-optimality of Uniprocessor Fixed Priority Pre-emptive Scheduling for Sporadic Tasksets with Arbitrary Deadlines

Limited Preemptive Scheduling for Real-Time Systems: a Survey

Resource Sharing. CSCE 990: Real-Time Systems. Steve Goddard. Resources & Resource Access Control (Chapter 8 of Liu)

Global EDF Scheduling for Parallel Real-Time Tasks

Quantifying the Sub-optimality of Uniprocessor Fixed Priority Non-Pre-emptive Scheduling

Improving the Sensitivity of Deadlines with a Specific Asynchronous Scenario for Harmonic Periodic Tasks scheduled by FP

Improving the Quality of Control of Periodic Tasks Scheduled by FP with an Asynchronous Approach

Keynote: RTNS Getting ones priorities right

Single-Facility Scheduling over Long Time Horizons by Logic-based Benders Decomposition

Lecture 4: November 17, Part 1 Single Buffer Management

Critical sections. Using semaphores. Using semaphores. Using semaphores. How long is blocking time? 17/10/2016. Problems caused by mutual exclusion

On the Multicriteria Integer Network Flow Problem

Clock-Driven Scheduling (in-depth) Cyclic Schedules: General Structure

Winter 2008 CS567 Stochastic Linear/Integer Programming Guest Lecturer: Xu, Huan

Two Methods to Release a New Real-time Task

Quantifying the Exact Sub-Optimality of Non-Preemptive Scheduling

Partitioned Scheduling of Multi-Modal Mixed- Criticality Real-Time Systems on Multiprocessor Platforms

On Energy-Optimal Voltage Scheduling for Fixed-Priority Hard Real-Time Systems

Lecture Notes on Linear Regression

Improvements in the configuration of Posix b scheduling

Partitioned EDF Scheduling in Multicore systems with Quality of Service constraints

Worst-case response time analysis of real-time tasks under fixed-priority scheduling with deferred preemption

Partitioned Scheduling of Multi-Modal Mixed-Criticality Real-Time Systems on Multiprocessor Platforms

For now, let us focus on a specific model of neurons. These are simplified from reality but can achieve remarkable results.

Structure and Drive Paul A. Jensen Copyright July 20, 2003

FREQUENCY DISTRIBUTIONS Page 1 of The idea of a frequency distribution for sets of observations will be introduced,

Parallel Real-Time Scheduling of DAGs

CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE

Assortment Optimization under MNL

Overhead-Aware Compositional Analysis of Real-Time Systems

Resource Allocation with a Budget Constraint for Computing Independent Tasks in the Cloud

ECE559VV Project Report

The optimal delay of the second test is therefore approximately 210 hours earlier than =2.

CS : Algorithms and Uncertainty Lecture 17 Date: October 26, 2016

Outline. Communication. Bellman Ford Algorithm. Bellman Ford Example. Bellman Ford Shortest Path [1]

A 2D Bounded Linear Program (H,c) 2D Linear Programming

Handling Overload (G. Buttazzo, Hard Real-Time Systems, Ch. 9) Causes for Overload

Economics 101. Lecture 4 - Equilibrium and Efficiency

Synchronization Protocols. Task Allocation Bin-Packing Heuristics: First-Fit Subtasks assigned in arbitrary order To allocate a new subtask T i,j

Kernel Methods and SVMs Extension

On the Scheduling of Mixed-Criticality Real-Time Task Sets

The Schedulability Region of Two-Level Mixed-Criticality Systems based on EDF-VD

Minimisation of the Average Response Time in a Cluster of Servers

Lecture 12: Classification

Schedulability Analysis of Task Sets with Upper- and Lower-Bound Temporal Constraints

Energy and Feasibility Optimal Global Scheduling Framework on big.little platforms

Errors for Linear Systems

Computing Correlated Equilibria in Multi-Player Games

Procrastination Scheduling for Fixed-Priority Tasks with Preemption Thresholds

Energy-Efficient Scheduling Fixed-Priority tasks with Preemption Thresholds on Variable Voltage Processors

= z 20 z n. (k 20) + 4 z k = 4

Equilibrium Analysis of the M/G/1 Queue

An Integrated OR/CP Method for Planning and Scheduling

A Bayes Algorithm for the Multitask Pattern Recognition Problem Direct Approach

Two-Way and Multiple-Access Energy Harvesting Systems with Energy Cooperation

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 7: LP Duality Lecturer: Matt Weinberg

Schedulability Analysis of Preemptive and Nonpreemptive EDF on Partial Runtime-Reconfigurable FPGAs

11 Tail Inequalities Markov s Inequality. Lecture 11: Tail Inequalities [Fa 13]

CIS526: Machine Learning Lecture 3 (Sept 16, 2003) Linear Regression. Preparation help: Xiaoying Huang. x 1 θ 1 output... θ M x M

Two-Phase Low-Energy N-Modular Redundancy for Hard Real-Time Multi-Core Systems

Psychology 282 Lecture #24 Outline Regression Diagnostics: Outliers

Chapter - 2. Distribution System Power Flow Analysis

LINEAR REGRESSION ANALYSIS. MODULE IX Lecture Multicollinearity

Energy-Efficient Primary/Backup Scheduling Techniques for Heterogeneous Multicore Systems

Computer Control: Task Synchronisation in Dynamic Priority Scheduling

Resource Reservation for Mixed Criticality Systems

Task Scheduling with Self-Suspensions in Soft Real-Time Multiprocessor Systems

Using non-preemptive regions and path modification to improve schedulability of real-time traffic over priority-based NoCs

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

An Upper Bound on SINR Threshold for Call Admission Control in Multiple-Class CDMA Systems with Imperfect Power-Control

Multiple Sound Source Location in 3D Space with a Synchronized Neural System

The Minimum Universal Cost Flow in an Infeasible Flow Network

Classification as a Regression Problem

Utilization-Based Scheduling of Flexible Mixed-Criticality Real-Time Tasks

Statistics for Economics & Business

NUMERICAL DIFFERENTIATION

Lecture 10 Support Vector Machines. Oct

Energy-Aware Fault Tolerance in Fixed-Priority Real-Time Embedded Systems*

Offline Equivalence: A Non-Preemptive Scheduling Technique for Resource-Constrained Embedded Real-Time Systems

E Tail Inequalities. E.1 Markov s Inequality. Non-Lecture E: Tail Inequalities

Efficient Feasibility Analysis for Real-Time Systems with EDF scheduling*

P R. Lecture 4. Theory and Applications of Pattern Recognition. Dept. of Electrical and Computer Engineering /

Partitioned Mixed-Criticality Scheduling on Multiprocessor Platforms

Transcription:

Real-Tme Systems Multprocessor schedulng Specfcaton Implementaton Verfcaton Multprocessor schedulng -- -- Global schedulng How are tasks assgned to processors? Statc assgnment The processor(s) used for executng a task are determned before system s put n msson ( off-lne ) Approach: Dynamc assgnment The processor(s) used for executng a task are determned durng system operaton on-lne Approach: Global schedulng Multprocessor schedulng Multprocessor schedulng How are tasks allowed to mgrate? No mgraton! Each nstance of a task must execute on the same processor Equvalent to multple unprocessor systems! Global schedulng Full mgraton! A task s allowed to execute on an arbtrary processor Mgraton can occur even durng executon of an nstance of a task (for example, after beng preempted) A fundamental lmt: (Andersson, Baruah & Jonsson, 00) The utlzaton guarantee bound for multprocessor schedulng (parttoned or global) usng statc task prortes cannot be hgher than / of the capacty of the processors. Hence, we should not expect to utlze more than half the processng capacty f hard real-tme constrants exst. A way to crcumvent ths lmt s to use p-far (prortes + tme quanta) schedulng and dynamc task prortes.

General characterstcs: Each processor has ts own queue for ready tasks Tasks are organzed n groups, and each task group s assgned to a specfc processor For example, usng a bn-packng algorthm When selected for executon, a task can only be dspatched to ts assgned processor Advantages: Mature schedulng framework Most unprocessor schedulng theory also applcable here Unprocessor resource-management protocols can be used Supported by automotve ndustry AUTOSAR prescrbes parttoned schedulng Dsadvantages: Cannot explot all unused executon tme Surplus capacty cannot be shared among processors Wll suffer from overly-pessmstc WCET dervaton Bn-packng algorthms: Basc dea: The problem concerns packng objects of varyng szes n boxes ( bns ) wth the objectve of mnmzng number of used boxes. Applcaton to multprocessor systems: Bns are represented by processors and objects by tasks. The decson whether a processor s full or not s derved from a utlzaton-based feasblty test. Assumptons: Independent, perodc tasks Preemptve, unprocessor schedulng (RM) Bn-packng algorthms: Rate-Monotonc-Frst-Ft (RMFF): (Dhall and Lu, 978) Let the processors be ndexed as μ,μ, Assgn the tasks n the order of ncreasng perods (that s, RM order). For each task, choose the lowest prevously-used j such that, together wth all tasks that have already been assgned to processor μ j, can be feasbly scheduled accordng to the utlzaton-based RM-feasblty test. Processors are added f needed for RM-schedulablty.

(ths page delberately left blank) Bn-packng algorthms: U RMFF The utlzaton guarantee bound for a system wth m processors usng RMFF schedulng s m( / ) U RMFF (Oh & Baker, 998) Note: ( / ) 0.4 Thus: task sets whose utlzaton do not exceed 4% of the total processor capacty s always RMFF-schedulable. Global schedulng General characterstcs: All ready tasks are kept n a common (global) queue that s shared among the processors Whenever a processor becomes dle, a task from the global queue s selected for executon on that processor. After beng preempted, a task may be dspatched to a processor other than the one that started executng the task. Global schedulng Advantages: Supported by most multprocessor operatng systems Wndows 7, Mac OS X, Lnux,... Effectve utlzaton of processng resources Unused processor tme can easly be reclamed, for example when a task does not execute ts full WCET. Dsadvantages: Few results from the unprocessor case can be used 3

The root of all evl n global schedulng: (Lu, 969) Few of the results obtaned for a sngle processor generalze drectly to the multple processor case; brngng n addtonal processors adds a new dmenson to the schedulng problem. The smple fact that a task can use only one processor even when several processors are free at the same tme adds a surprsng amount of dffculty to the schedulng of multple processors. Underlyng causes: Dhall s effect: Wth RM, DM and EDF, some low-utlzaton task sets can be unschedulable regardless of how many processors are used. Thus, any utlzaton guarantee bound would become so low that t would be useless n practce. Ths s n contrast to the unprocessor case where we have utlzaton guarantee bounds of 69.3% (RM) and 00% (EDF). Hard-to-fnd crtcal nstant: A crtcal nstant does not always occur when a task arrves at the same tme as all ts hgher-prorty tasks. Ths s n stark contrast to the unprocessor case! Dhall s effect: (Dhall & Lu, 978) (RM schedulng) { C, ε T } { C, ε T } { C3, ε T3 } { C, T + ε} 4 4 4 Dhall s effect: Apples for RM, DM and EDF schedulng Least utlzaton of unschedulable task sets can be arbtrarly close to no matter how many processors are used. μ 4 4 msses ts deadlne U global m ε + ε + when ε 0 μ μ 3 0 ε + ε Consequence: New multprocessor prorty-assgnment schemes are needed! 4

Hard-to-fnd crtcal nstant: 3 μ μ (RM schedulng) response tme of 3 s maxmzed for second nstance, 3,,,3,4 3,,5 3,3,6,7 3,4,8,,,,,3,3,4,5,4 { C, T } { C, T 3} { C, T 4} 3 3 3 0 4 8 6 Hard-to-fnd crtcal nstant: A crtcal nstant does not always occur when a task arrves at the same tme as all ts hgher-prorty tasks. Fndng the crtcal nstant s a very (NP-?) hard problem Note: recall that knowledge about the crtcal nstant s a fundamental property n unprocessor feasblty tests. Consequence: New methods for constructng effectve multprocessor feasblty tests are needed! New prorty-assgnment scheme Dhall s effect: (Dhall & Lu, 978) (RM schedulng) 4 { C, ε T } { C, ε T } { C3, ε T3 } { C, T + ε} 4 4 4 4 msses ts deadlne How to avod Dhall s effect: Problem: RM, DM & EDF only account for task deadlnes! Actual computaton demands are not accounted for. Soluton: Dhall s effect can easly be avoded by lettng tasks wth hgh utlzaton receve hgher prorty: μ μ 4 4 μ μ μ 3 0 ε + ε μ 3 0 ε + ε 5

New prorty-assgnment scheme Example: RM-US[m/(3m-)] RM-US[m/(3m-)]: (Andersson, Baruah & Jonsson, 00) RM-US[m/(3m-)] assgns (statc) prortes to tasks accordng to the followng rule: If U > m/(3m ) then has the hghest prorty (tes broken arbtrarly) If U m/(3m ) then has RM prorty Clearly, tasks wth hgher utlzaton, U C / T, get hgher prorty. Problem: Assgn prortes accordng to RM-US[m/(3m-)], assumng the followng task set to be scheduled on a system wth m 3 processors: { C, T 7} { C, T 0} 3 { C3 9, T3 0} 4 { C4, T4 } { C, T 5} 5 5 5 We solve ths on the blackboard! New feasblty tests New feasblty tests Processor utlzaton analyss for RM-US[m/(3m-)]: A suffcent condton for RM-US[m/(3m-)] schedulng on m dentcal processors s n C m U T 3m Queston: does RM-US[m/(3m-)] avod Dhall s effect? Processor utlzaton analyss for RM-US[m/(3m-)]: We observe that, regardless of the number of processors, the task set wll always meet ts deadlnes as long as no more than one thrd of the processng capacty s used: U RM US m m m [ /(3m )] lm m 3 m 3 RM-US[m/(3m-)] thus avods Dhall s effect snce we can always add more processors f deadlnes were mssed. Note that ths remedy was not possble wth tradtonal RM. 6

New feasblty tests Response-tme analyss for multprocessors: Uses the same prncple as the unprocessor case, where the response tme for a task conssts of: C I The task s unnterrupted executon tme (WCET) Interference from hgher-prorty tasks R C + I The dfference s that the calculaton of nterference now has to account for the fact that hgher-prorty tasks can execute n parallel on the processors. New feasblty tests Response-tme analyss for multprocessors: For the multprocessor case, wth n tasks and m processors, we observe two thngs:. Interference can only occur when n> m. { }. Interference can only affect tasks k : k > m snce the m hghest-prorty tasks wll always execute n parallel wthout contenton on the m processors. Consequently, nterference of a task s a functon of the executon overlap of ts hgher-prorty tasks. New feasblty tests New feasblty tests Response-tme analyss for multprocessors: The followng two observatons gve us the secret to analyzng the nterference of a task: Wth respect to the executon overlap t can be shown that the nterference s maxmzed when the hgher-prorty tasks completely overlap ther executon. Compared to the unprocessor case, one extra nstance of each hgher-prorty task must be accounted for n the nterference analyss. Response-tme analyss for multprocessors: The worst-case nterference term s R I Cj + Cj m j hp() T j where hp() s the set of tasks wth hgher prorty than. The worst-case response tme for a task s thus: R R C + Cj + Cj m j hp() T j 7

New feasblty tests Global schedulng Response-tme analyss for multprocessors: As before, an teratve approach can be used for fndng the worst-case response tme: n n R + R C + Cj + Cj m j hp() T j We now have a suffcent condton for statc-prorty schedulng on multprocessors: : R D State-of-the-art n global schedulng: Statc prortes: RM-US[m/(3m-)] crcumvents Dhall s effect and has a non-zero resource utlzaton guarantee bound of m/(3m-) 33.3%. In 003, Baker generalzed the RM-US results to DM. Dynamc prortes: In 00, Srnvasan & Baruah proposed the EDF-US[m/(m-)] scheme wth a correspondng non-zero resource utlzaton guarantee bound of m/(m-) 50%. Optmal multprocessor schedulng: Usng p-far (prortes + tme quanta) schedulng and dynamc prortes t s possble to acheve 00% resource utlzaton on a multprocessor. 8