3 RTSys SS2024 Lecture7+8 WorkSheets 240513 W Notes
3 RTSys SS2024 Lecture7+8 WorkSheets 240513 W Notes
3 RTSys SS2024 Lecture7+8 WorkSheets 240513 W Notes
...
1
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
2
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
W3a Task State Model of µC/OS [from: J. Labrosse, MicroC/OS-II, CMP Books 1999]
3
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
Task B
Task B
4
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
The design of a real-time application plans three periodic tasks with the following repeat
cycle periods Pi and execution times Ei :
Task A P1 = 8 ms E1 = 2.0 ms
Task B P2 = 10 ms E2 = 4.0 ms
Task C P3 = 40 ms E3 = 10.0 ms
Task A has the highest, task C the lowest priority. Task-switching times can be neglected.
The deadline of each task is equal to the end of its period.
a) Determine the resulting CPU-load, b) draw the tasks' timing diagrams, c) discuss the
design as a whole (i.e. does it work or not ?) and d) what is the start time jitter (worst case
delay vs. the ideal start time) of the low priority tasks below ?
Task A
Task B
Task C
0 10 20 30 40 50 60 t [ms]
5
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
The design of a real-time application plans three periodic tasks with the following repeat
cycle periods Pi and execution times Ei :
Task A P1 = 20 ms E1 = 4.0 ms
Task B P2 = 10 ms E2 = 5.0 ms
Task C P3 = 50 ms E3 = 10.0 ms
Task A has the highest, task C the lowest priority. Task-switching times can be neglected.
The deadline of each task is equal to the end of its period.
a) Determine the resulting CPU-load, b) draw the tasks' timing diagram, c) discuss the
design as a whole.
Task A
Task B
Task C
0 10 20 30 40 50 60 t [ms]
6
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
Task B
Task B
W3f Dynamic Task Priorities – Earliest Deadline First Approach vs. RMA
7
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
8
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
Sema
Task 1
Task 2
9
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
10
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
Sema
ISR
Task
11
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
W6a Priority Inversion Problem [from: J. Labrosse, MicroC/OS-II, CMP Books 1999]
12
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
W7a General Interrupt Mechanism [from: J. Labrosse, MicroC/OS-II, CMP Books 1999]
W7b Interrupt Nesting & OS-Notification [from: J.Labrosse, MicroC/OS-II, CMP Books 1999]
13
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
W7c Interrupt & Preemptive Multitasking [from: J.Labrosse, MicroC/OS-II, CMP Books 1999]
14
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
W9a Delaying a Task for one Tick [from: J.Labrosse, MicroC/OS-II, CMP Books 1999]
W9b Delaying a Task for one Tick [from: J.Labrosse, MicroC/OS-II, CMP Books 1999]
15
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
W10 µC/OS Basic Configuration and Memory Usage (V2.00 for 80186)
[from: J.Labrosse, MicroC/OS-II, CMP Books 1999]
16
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
17
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
18
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
main( )
{
…
}
StartUpTask( )
{
…
}
UserTask1( )
{
…
}
UserTask2( )
{
…
}
IdleTask( )
{
…
}
StatisticsTask( )
{
…
}
’Runtime-Library’
19
Prof. Dr.-Ing. B. Mysliwetz Electrical Engineering and
Real-Time Systems Information Technology
20