real real time systems time systems example scheduling
play

Real Real- -Time Systems Time Systems Example: scheduling using - PowerPoint PPT Presentation

EDA222/DIT160 Real-Time Systems, Chalmers/GU, 2008/2009 Lecture #14 Updated 2009-03-01 Real Real- -Time Systems Time Systems Example: scheduling using EDF Example: scheduling using EDF Problem: Assume a system with tasks according to the


  1. EDA222/DIT160 – Real-Time Systems, Chalmers/GU, 2008/2009 Lecture #14 Updated 2009-03-01 Real Real- -Time Systems Time Systems Example: scheduling using EDF Example: scheduling using EDF Problem: Assume a system with tasks according to the figure Problem: below. The timing properties of the tasks are given in the table. Investigate the schedulability of the tasks when EDF is used. Specification (Note that D i < T i for all tasks) • Dynamic scheduling Implementation -- Earliest-deadline-first Task C i D i T i scheduling τ τ τ τ • Processor-demand analysis 1 1 2 1 3 1 2 τ 1 2 4 2 τ 1 3 8 3 Verification Example: scheduling using EDF Feasibility analysis for EDF Example: scheduling using EDF Feasibility analysis for EDF Simulate an execution of the tasks: What analysis methods are suitable for general EDF: What analysis methods are suitable for general EDF: • Utilization-based analysis? τ Not suitable! Not general enough or exact enough 1 – Does not work well for the case of D i < T τ • Response-time analysis? τ misses its deadline! 3 2 Not suitable! Analysis much more complex than for DM τ 3 – Critical instant does not necessarily occur when all tasks arrive t 0 2 at the same time for the first time 4 6 8 – Instead, response time of a task is maximized at some scenario The tasks are not schedulable even though where all other tasks arrive at the same time; the worst such U = 1 2 + 1 4 + 1 8 = 7 scenario has to be identified for each task before the response 8 = 0.875 < 1 time of that task can be calculated

  2. EDA222/DIT160 – Real-Time Systems, Chalmers/GU, 2008/2009 Lecture #14 Updated 2009-03-01 Processor Processor- -demand analysis demand analysis Processor- Processor -demand analysis demand analysis Processor demand: Processor demand: Processor demand: Processor demand: • The processor demand for a task in a given time • We can calculate by counting how many times task τ τ L N [ ] i i i 0, L − D i ⎡ ⎤ interval is the amount of processor time that the has arrived during the interval . 0, L ⎣ ⎦ task needs in the interval in order to meet the deadlines • We can ignore instances of the task that arrived during that fall within the interval. L − D i , L ⎡ ⎤ D i > L the interval since for these instances. ⎣ ⎦ • Let represent the number of instances of that must τ L N D i > L i i Instance with complete execution before . L • The total processor demand up to is L τ = L N 2 1 1 n ∑ C P (0, L ) = = L C i N i L 3 τ N 2 2 i = 1 t 0 L Exact feasibility test for EDF Exact feasibility test for EDF Processor- -demand analysis demand analysis Processor (Sufficient and necessary condition) (Sufficient and necessary condition) Processor- -demand analysis: demand analysis: A sufficient and necessary sufficient and necessary condition for earliest condition for earliest- - Processor A D i ≤ T i • We can express as deadline- -first scheduling, for which , is first scheduling, for which , is deadline L N i ⎢ L − D i ⎥ L = ∀ L : C P (0, L ) ≤ L ⎥ + 1 ⎢ N i ⎣ ⎦ T i [ ] where is the total processor demand in . where is the total processor demand in . C P (0, L ) 0, L • The total processor demand is thus The processor The processor- -demand analysis and associated feasibility test demand analysis and associated feasibility test ⎛ ⎢ L − D i ⎥ ⎞ n ∑ C P (0, L ) = ⎥ + 1 was presented by S. was presented by S. Baruah Baruah, L. Rosier and R. Howell in 1990. , L. Rosier and R. Howell in 1990. ⎜ ⎢ ⎟ C i ⎝ ⎠ ⎣ ⎦ T i i = 1

  3. EDA222/DIT160 – Real-Time Systems, Chalmers/GU, 2008/2009 Lecture #14 Updated 2009-03-01 Exact feasibility test for EDF Exact feasibility test for EDF Example: scheduling using EDF Example: scheduling using EDF (Sufficient and necessary condition) (Sufficient and necessary condition) How large interval must be examined? How large interval must be examined? Problem: Assume a system with tasks according to the figure below. Problem: • Largest interval is LCM of the task • The timing properties of the tasks are given in the table. Largest interval is LCM of the task’ ’s periods s periods a) Determine, by analyzing the processor demand, whether the tasks are schedulable or not using EDF. How many time points must be examined? How many time points must be examined? • Only absolute deadlines need to be examined • b) Determine, by using simulation, whether the tasks are Only absolute deadlines need to be examined schedulable or not using EDF. The test can consequently be improved as follows: The test can consequently be improved as follows: Task C i D i T i τ τ τ τ 2 3 4 ∀ L ∈ K : C P (0, L ) ≤ L 1 1 2 3 τ 2 7 8 2 τ 3 12 16 3 { { } } = = + ≤ ≤ ≤ ≥ k | k , k LCM , , ,1 , 0 K D D kT D D T T i n k i i i i i 1 n … We solve this on the whiteboard! We solve this on the whiteboard! Extended processor processor- -demand analysis demand analysis Deadline inversion Extended Deadline inversion The test can be extended to handle: The test can be extended to handle: H and L share resource R • Blocking normal execution critical region • Start-time variations (”release jitter”) H misses its deadline H blocked • Time offsets H • … t M In this course, we only study blocking. In this course, we only study blocking. t L t 1 t 2 t

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend