Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ernest Cachia University of Malta “Real-Time System Development” Slide No. 1 of part 3 n What about jitter? To calculate jitter one should have data regarding.

Similar presentations


Presentation on theme: "Ernest Cachia University of Malta “Real-Time System Development” Slide No. 1 of part 3 n What about jitter? To calculate jitter one should have data regarding."— Presentation transcript:

1

2 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 1 of part 3 n What about jitter? To calculate jitter one should have data regarding context switching… n In the previous example we will assume a context switching value of 3 ms (normally in the range of 1.5 ~ 4.5 ms) n Therefore, jitter would be: period - context sw. - 1 task exec. time - cushioning 33.33 ms - 3 ms - 6.17 ms - 4.83 ms = 19.33 ms Jitter Estimation Example

3 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 2 of part 3 Basic R-T Requirement concerns These are generally thought of as 2: n Software structure F Timing management F Concurrency management n Actual code F Algorithmic embodiment The aspects highlighted in grey are highly dependent on the run-time system properties

4 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 3 of part 3 Steps in R-T Design Partition System Design Control Design Complexity Ensure Timing Robustness Periodic tasks Aperiodic tasks Priority Coupling Cohesion Synch. Req. Separate concerns Use of stand. I/O Req. impact 123

5 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 4 of part 3 R-T Scheduling Design n Determine individual task timing and priority requirements F Period F Execution time F Deadline F Priority n Place all the tasks on a common application timeline n Ascertain that all tasks satisfy their individual requirements Rate Monotonic Scheduling (RMS) is generally assumed

6 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 5 of part 3 R-T Scheduling Example (Task requirements) n Task 1: F Execution time = 30 ms F Period = 90 ms n Task2: F Execution time = 20 ms F Period = 100 ms n Task 3: F Execution time = 100 ms F Period = 250 ms

7 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 6 of part 3 R-T Scheduling Example (Application timeline graph based on previous slide) Time (ms) Task 1 Task 2 Task 3 30 20 40 60 20 70 20 30 20 30 70 60 10020030090180270 20 250 70 60 90

8 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 7 of part 3 Meeting Task Deadlines (1) Assuming RMS task arrangement

9 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 8 of part 3 Meeting Task Deadlines (2) Theorem 1 (The deadline theorem) Note that U(n) approaches the value of ln 2 (0.69)

10 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 9 of part 3 t is the interval in which a given task must be scheduled. Finding t proves that a set of tasks is schedulable Meeting Task Deadlines (3) Theorem 2 (The critical zone theorem) W n (t) is the CPU cumulative demand

11 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 10 of part 3 Example (Theorem 1) (1) Consider 4 periodic tasks  1,  2,  3, and  4 with the following properties:  1 C 1 = 50 ms, T 1 = 150 ms;  2 C 2 = 25 ms, T 2 = 200 ms;  3 C 3 = 30 ms, T 3 = 200 ms  4 C 4 = 120 ms, T 4  2000 ms

12 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 11 of part 3 Example (Theorem 1) (2) Therefore, U(4) for this set of tasks is 0.848. This value is clearly greater than the max CPU utilisation for 4 tasks (0.756). Therefore, it cannot be guaranteed that these 4 tasks will always meet their deadlines. Let us try a longer timeline of 1000 ms... In this case, U(4) computed with a timeline of 1000 ms is 0.728. This guarantees that all 4 tasks will always meet their deadlines. (In fact, for this set, the minimum timeline is computed at 811 ms).

13 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 12 of part 3 Remember to tell them what they’re to do! Il-”home-work” taghkom

14 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 13 of part 3 Example (Theorem 2) n A worked example with three periodic tasks will be described during lecture sessions as this is rather too lengthy to include as a slide.

15 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 14 of part 3 Task Synchronisation n Based on the notion that some periodic and dependent tasks could be blocked (share resources) and may have deadlines shorter than their periods. n For a given task  i it can be said that E i = T i - D i n If  i is the last task to complete then its estimated execution time becomes C i + E i + B i [B i is the period  i is blocked]

16 Ernest Cachia University of Malta “Real-Time System Development” Slide No. 15 of part 3 Modifying Theorem 1 Theorem 3 (The synchronisation theorem)


Download ppt "Ernest Cachia University of Malta “Real-Time System Development” Slide No. 1 of part 3 n What about jitter? To calculate jitter one should have data regarding."

Similar presentations


Ads by Google