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

Similar documents
Cyclic Schedules: General Structure. Frame Size Constraints

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

Embedded Systems. 4. Aperiodic and Periodic Tasks

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

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

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

Clock-driven scheduling

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

Two Methods to Release a New Real-time Task

There are three priority driven approaches that we will look at

Overhead-Aware Compositional Analysis of Real-Time Systems

EDF Scheduling for Identical Multiprocessor Systems

Finite Difference Method

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

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

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

Analysis of Discrete Time Queues (Section 4.6)

Scheduling Motivation

Global EDF Scheduling for Parallel Real-Time Tasks

Real-Time and Embedded Systems (M) Lecture 5

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

multiprogrammed, hard real-time environments Giuseppe Lipari John Carpenter Sanjoy Baruah particular server.

Problem Set 9 - Solutions Due: April 27, 2005

Limited Preemptive Scheduling for Real-Time Systems: a Survey

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

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

Partitioned Mixed-Criticality Scheduling on Multiprocessor Platforms

Lecture 2 Solution of Nonlinear Equations ( Root Finding Problems )

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

A NEW HYBRID RESCHEDULING POLICY BASED ON CUMULATIVE DELAY

3. Scheduling issues. Common approaches 3. Common approaches 1. Preemption vs. non preemption. Common approaches 2. Further definitions

Computer Control: Task Synchronisation in Dynamic Priority Scheduling

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

On the Throughput of Clustered Photolithography Tools:

CS 331 DESIGN AND ANALYSIS OF ALGORITHMS DYNAMIC PROGRAMMING. Dr. Daisy Tang

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

: Numerical Analysis Topic 2: Solution of Nonlinear Equations Lectures 5-11:

Keynote: RTNS Getting ones priorities right

Lecture 4: November 17, Part 1 Single Buffer Management

Calculation of time complexity (3%)

Appendix B: Resampling Algorithms

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

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

Uncertain Models for Bed Allocation

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

Worst Case Interrupt Response Time Draft, Fall 2007

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

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

Linear Momentum. Equation 1

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

CHAPTER 17 Amortized Analysis

Resource Reservation for Mixed Criticality Systems

Modeling motion with VPython Every program that models the motion of physical objects has two main parts:

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

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

NP-Completeness : Proofs

TOPICS MULTIPLIERLESS FILTER DESIGN ELEMENTARY SCHOOL ALGORITHM MULTIPLICATION

Real-Time Scheduling

A FAST HEURISTIC FOR TASKS ASSIGNMENT IN MANYCORE SYSTEMS WITH VOLTAGE-FREQUENCY ISLANDS

PHYS 1101 Practice problem set 12, Chapter 32: 21, 22, 24, 57, 61, 83 Chapter 33: 7, 12, 32, 38, 44, 49, 76

Queuing system theory

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

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

International Mathematical Olympiad. Preliminary Selection Contest 2012 Hong Kong. Outline of Solutions

A Simple Inventory System

Procrastination Scheduling for Fixed-Priority Tasks with Preemption Thresholds

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

Energy-Efficient Thermal-Aware Scheduling for RT Tasks Using T CP N

CS 3750 Machine Learning Lecture 6. Monte Carlo methods. CS 3750 Advanced Machine Learning. Markov chain Monte Carlo

Nonlinear Classifiers II

Variability-Driven Module Selection with Joint Design Time Optimization and Post-Silicon Tuning

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

Kernel Methods and SVMs Extension

Algorithm Design and Analysis

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

find (x): given element x, return the canonical element of the set containing x;

Instantaneous Utilization Based Scheduling Algorithms for Real Time Systems Radhakrishna Naik 1, R.R.Manthalkar 2 Pune University 1, SGGS Nanded 2

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

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

Parametric Utilization Bounds for Fixed-Priority Multiprocessor Scheduling

Predictable Execution Model: Concept and Implementation

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

Lecture 4. Instructor: Haipeng Luo

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

Case A. P k = Ni ( 2L i k 1 ) + (# big cells) 10d 2 P k.

COS 511: Theoretical Machine Learning. Lecturer: Rob Schapire Lecture # 15 Scribe: Jieming Mao April 1, 2013

Lecture 14: Bandits with Budget Constraints

Prof. Paolo Colantonio a.a

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

ONE-DIMENSIONAL COLLISIONS

Towards Minimizing Processes Response Time in Interactive Systems

This is the Pre-Published Version.

Loop-independent dependence: dependence exists within an iteration; i.e., if the loop is removed, the dependence still exists.

Module 9. Lecture 6. Duality in Assignment Problems

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

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

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

Experiment 5 Elastic and Inelastic Collisions

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

Example: (13320, 22140) =? Solution #1: The divisors of are 1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 27, 30, 36, 41,

Transcription:

CPSC-663: Real-me Systems n-depth Precompute statc schedule o-lne e.g. at desgn tme: can aord expensve algorthms. Idle tmes can be used or aperodc jobs. Possble mplementaton: able-drven Schedulng table has entres o type t k, Jt k, where t k : decson tme Jt k : job to start at tme t k Input: Schedule t k, Jt k k 0,,,N- ask Scheduler: : 0; k : 0; <set tmer to expre at tme t 0 > BEGIN LOOP <wat or tmer nterrupt> : +; k: mod N; <set tmer to expre at tme DIV N*H + t k > IF Jt k- s empty HEN wakeupaperodc ELSE wakeupjt k- END LOOP END Scheduler; Cyclc Schedules: General Structure Schedulng decson s made perodcally: rame Schedulng decson s made perodcally: choose whch job to execute perorm montorng and enorcement operatons decson ponts Major Cycle: Frames n a hyperperod. major cycle hyperperod H

CPSC-663: Real-me Systems Frame Sze Constrants Frames must be sucently long so that every job can start and complete wthn a sngle rame: max e he hyperperod must have an nteger number o rames: 2 H " dvdes" H For montorng purposes, rames must be sucently small that between release tme and deadlne o every job there s at least one rame: t t t+ t+2 t +D t +p t+3 3 2 t' t D t' t gcd p, 2 gcd p, D Frame Szes: Example ask set: p e D 5, 22,, 2, 3, 4 26 22 H 660 2 3 : H e : 2 gcd p, D 3 2,3,4,5,6,0,.. 2,3,4,5,6 possble values or :3,4,5,6 2

CPSC-663: Real-me Systems Slcng and Schedulng Blocks Slcng 2 3 p e D 4,, 4 5, 2, 5 5, 20 3 5 4?! slce 3 2 3 32 33 4, 5,, 2,, 3,, 4 5 20 20 20 3 3 4 4 schedulng block 2 3 2 32 2 2 33.. 0 4 8 2 6 20 H Cyclc Executve Input: Stored schedule: Lk or k 0,,,F-; Aperodc job queue. ASK CYCLIC_EXECUIVE: k 0; /* current rame */ BEGIN LOOP accept clock nterrupt at tme k*; IF <the last job s not completed> take acton; CurrentBlock : Lk; k : k+ mod F; IF <any slce n CurrentBlock s not released> take acton; WHILE <CurrentBlock s not empty> execute the rst slce n t; remove the rst slce rom CurrentBlock; END WHILE; WHILE <the aperodc job queue s not empty> execute the rst job n the queue; remove the just completed job; END WHILE; END LOOP; END CYCLIC_EXECUIVE; 3

CPSC-663: Real-me Systems What About Aperodc Jobs? ypcally: Scheduled n the background. her executon may be delayed. But: Aperodc jobs are typcally results o external events. hereore: he sooner the completon tme, the more responsve the system Mnmzng response tme o aperodc jobs becomes a desgn ssue. Approach: Execute aperodc jobs ahead o perodc jobs whenever possble. hs s called Slack Stealng. Slack Stealng Lehoczky et al., RSS 87 x k Amount o tme allocated to slces executed durng rame F k. s k Slack durng rame F k : s k : - x k. he cyclc executve can execute aperodc jobs or s k amount o tme wthout causng jobs to mss deadlnes. Example: 0 4.5 8 0.5 2.0 2 6 20 4 9.5 0.5 4

CPSC-663: Real-me Systems Sporadc Jobs Remnder: Sporadc jobs have hard deadlnes; the release tme and the executon tme are not known a pror. Worst-case executon tme known when job s released. Need acceptance test: Jd,e s c s c+ s l d F c- F c F c+ F l F l+ S c, l : otal amount o slack n Frames F c,, F l. l s c Acceptance est: IF Sc,l < e HEN reject job; ELSE accept job; schedule executon; END; how?! Statc schedulng: Schedulng o Accepted Jobs Schedule as large a slce o the accepted job as possble n the current rame. Schedule remanng portons as late as possble. Mechansm: Append slces o accepted job to lst o perodc-task slces n rames where they are scheduled. Problem: Early commt. Alternatves: Reschedulng upon arrval. Prorty-drven schedulng o sporadc jobs. 5

CPSC-663: Real-me Systems EDF-Schedulng o Accepted Jobs perodc tasks 2 3 N... acceptance test reject prorty queue aperodc processor Acceptance est or EDF-Scheduled Sporadc Jobs Sporadc Job J wth deadlne d arrves: est : est whether current amount o slack beore d s enough to accommodate J. I not, reject! est 2: est whether sporadc jobs stll n system wth deadlnes ater d wll mss deadlne J s accepted. I yes, reject! Accept! * Dene SJ : Amount o slack up to tme d ater J has been scheduled. ** Update all SJ wth d > d, that s, such that d > d : S J S J e 6

CPSC-663: Real-me Systems Pros and Cons o Pros: Conceptual smplcty mng constrants can be checked and enorced at rame boundares. Preempton cost can be kept small by havng approprate rame szes. Easy to valdate: Executon tmes o slces known a pror. Cons: Dcult to mantan. Does not allow to ntegrate hard and sot deadlnes. 7