Real-Time Programming Languages - Operating Systems
Real-Time Programming Languages - Operating Systems Real-Time Programming Languages - Operating Systems
Example EDF 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 01 01 task A is pragma Priority(5); pragma Relative_Deadline(10); -- gives an initial relative -- deadline of 10 milliseconds end A; task body A is Next_Release: Real_Time.Time; begin Next_Release := Real_Time.Clock; loop -- code Next_Release := Next_Release + Real_Time.Milliseconds(10); Delay_Until_And_Set_Deadline(Next_Release, Real_Time.Milliseconds(10); end loop end A; Finally the dispatching policy must be changed from pragma Task_Dispatching_Policy(FIFO_Within_Priorities); to pragma Task_Dispatching_Policy(EDF_Across_Priorities); Burns, Wellings Ch. 14.3 Page 345 WS 2013/14 Real-Time Systems, Real-Time Prog. Languages / Hermann Härtig 60
Example 01 02 03 04 05 06 07 08 09 10 11 protected Overrun is pragma Priority(Min_Handler_Ceiling); entry Stop_Task; procedure Handler(TM : in out Timer); procedure Reset(C1, C2 : Time_Span); private Abandon : Boolean := False; First_Occurence : Boolean := True; WCET : Time_Span; WCET_Overrun : Time_Span; end Overrun; Burns, Wellings Ch. 15.5 Page 373 WS 2013/14 Real-Time Systems, Real-Time Prog. Languages / Hermann Härtig 61
- Page 9 and 10: Esterel „Data“: Variables and S
- Page 11 and 12: Signals vs Variables 01 Emit Count(
- Page 13 and 14: Examples (all by Berry): ABRO Speci
- Page 15 and 16: Speed Specification SPEED: Count th
- Page 17 and 18: Few general points Ada has “Annex
- Page 19 and 20: Concurrency Tasks ● ● ● ● a
- Page 21 and 22: Termination of Tasks Every task has
- Page 23 and 24: The Rendezvous Based on client/serv
- Page 25 and 26: In detail task executing Server Cli
- Page 27 and 28: Select Statement ● ● Arbitrary
- Page 29 and 30: Example: Resource with Locking 01 0
- Page 31 and 32: Tasks ./. Protected Objects 01 02 0
- Page 33 and 34: Fixed Priorities ● task (type) T
- Page 35 and 36: Active Priority Base priority or
- Page 37 and 38: EDF Dispatching How to set deadline
- Page 39 and 40: Mixed Scheduling Policies, example
- Page 41 and 42: Explicit Request Ordering: Requeue
- Page 43 and 44: Timing events 01 02 03 04 05 06 07
- Page 45 and 46: Example: Watchdog 01 02 03 04 05 06
- Page 47 and 48: Time: Delay Statement 01 02 03 04 0
- Page 49 and 50: Delay and Select, client side(1) 01
- Page 51 and 52: Example 01 02 03 04 05 06 07 select
- Page 53 and 54: Example: Operator/Subscriber 01 02
- Page 55 and 56: Example: Operator/Subscriber 01 02
- Page 57 and 58: Recurrent Tasks (1) 01 02 03 04 05
- Page 59: Recurrent Tasks (3) Periodic tasks
- Page 63 and 64: Example 01 02 03 04 05 06 07 08 09
- Page 65 and 66: Missing in this RT-HLL lecture ●
Example EDF<br />
01<br />
02<br />
03<br />
04<br />
05<br />
06<br />
07<br />
08<br />
09<br />
10<br />
11<br />
12<br />
13<br />
14<br />
15<br />
16<br />
17<br />
18<br />
01<br />
01<br />
task A is<br />
pragma Priority(5);<br />
pragma Relative_Deadline(10);<br />
-- gives an initial relative<br />
-- deadline of 10 milliseconds<br />
end A;<br />
task body A is<br />
Next_Release: <strong>Real</strong>_<strong>Time</strong>.<strong>Time</strong>;<br />
begin<br />
Next_Release := <strong>Real</strong>_<strong>Time</strong>.Clock;<br />
loop<br />
-- code<br />
Next_Release := Next_Release + <strong>Real</strong>_<strong>Time</strong>.Milliseconds(10);<br />
Delay_Until_And_Set_Deadline(Next_Release,<br />
<strong>Real</strong>_<strong>Time</strong>.Milliseconds(10);<br />
end loop<br />
end A;<br />
Finally the dispatching policy must be changed from<br />
pragma Task_Dispatching_Policy(FIFO_Within_Priorities);<br />
to<br />
pragma Task_Dispatching_Policy(EDF_Across_Priorities);<br />
Burns,<br />
Wellings<br />
Ch. 14.3<br />
Page 345<br />
WS 2013/14 <strong>Real</strong>-<strong>Time</strong> <strong>Systems</strong>, <strong>Real</strong>-<strong>Time</strong> Prog. <strong>Languages</strong> / Hermann Härtig 60