View
0
Download
0
Category
Preview:
Citation preview
RTOS support for
mixed time-triggered and
event-triggered task sets
Martijn van den Heuvel,
R.J. Bril, J.J. Lukkien, D. Isovic
G. Sankar Ramachandran
Thanks to:
Syed M.J. Abdullah and Xiaodi Zhang
IEEE/IFIP Embedded and Ubiquitous Computing (EUC) 2012
Complexity of industrial applications
/ Mathematics and computer science PAGE 1 6-12-2012
Efficient resource usage vs. complex constraints
Task model
/ Mathematics and computer science PAGE 2 6-12-2012
Periodic task ( Pi )
Sporadic task ( Si )
A-periodic task ( Ai )
• Tasks
• Job
• Relative deadline = D
• Absolute deadline = arrival time +D
Preemptive EDF scheduling: based on absolute deadline
Arrival time di,k
job
D
Event-triggered:
Time-triggered:
How slotshifting works?
/ Mathematics and computer science PAGE 3 6-12-2012
[Isovic and Fohler, RTSJ 2009]
/ Mathematics and computer science PAGE 4 6-12-2012
Creating the off-line schedule (1/2)
• Offline reservation of periodic tasks into intervals
• Divide an interval into reserved capacity and spare
capacity
P1
P3P2
Periodic tasks
spare capacityreserved capacity
length of the interval
1 2 4 5 6 7 8 9 10 113
P3
0 12
P1 P2
I0 I1
/ Mathematics and computer science PAGE 5 6-12-2012
Creating the off-line schedule (2/2)
• reserved capacity of an interval:
• Periodic tasks requiring more capacity must execute
in an earlier interval
+
Periodic
jobs
reserved
1 5 6 7 8 9 10 112 43
P3
0 12
P1 P2
reserved capacity (I0)
reserved capacity (I1)
Periodic jobs
of later intervals
How slotshifting works?
/ Mathematics and computer science PAGE 6 6-12-2012
[Isovic and Fohler, RTSJ 2009]
/ Mathematics and computer science PAGE 7 6-12-2012
Off-line test for sporadic tasks
Schedulability test of sporadic tasks
• Classical demand-based analysis
• Supply by slotshifting (spare capacity)
Demand
during an interval of length L L≤ [Baruah
RTSS06]
Demand
during an interval of length L≤
supply based on slotshifting
Supply
during an interval of length L
How slot-shifting works?
/Mathematics and computer science PAGE 8 6-12-2012
[Isovic and Fohler, RTSJ 2009]
How slot-shifting works?
/Mathematics and computer science PAGE 9 6-12-2012
[Isovic and Fohler, RTSJ 2009]
Extending a commercial RTOS
• MicroC/OS-II is
Event-driven fixed-priority scheduling
Available at http://micrium.com/
• We extended MicroC/OS-II with
Time-keeping for time-triggered tasks
WCET monitoring
EDF scheduler
Admission control (accounting spare time)
/Mathematics and computer science PAGE 10 6-12-2012
Extending a commercial RTOS
• MicroC/OS-II is
Event-driven fixed-priority scheduling
Available at http://micrium.com/
• We extended MicroC/OS-II with
Time-keeping for time-triggered tasks
See paper for pseudo-code
WCET monitoring
EDF scheduler
Admission control (accounting spare time)
/Mathematics and computer science PAGE 11 6-12-2012
Extending a commercial RTOS
• MicroC/OS-II is
Event-driven fixed-priority scheduling
Available at http://micrium.com/
• We extended MicroC/OS-II with
Time-keeping for time-triggered tasks
EDF scheduler
WCET monitoring
Admission control (accounting spare time)
/Mathematics and computer science PAGE 12 6-12-2012
WCET monitoring
• System queue with absolute deadlines
• A virtual interval timer to track WCETs
(De)Activate upon context switch
• Timer expirations require overload handling
[1] Van den Heuvel et al., Transparent Synchronization Protocols for
Compositional Real-Time Systems, IEEE Trans. Industrial Informatics, May 2012
/Mathematics and computer science PAGE 13 6-12-2012
Extending a commercial RTOS
• MicroC/OS-II is
Event-driven fixed-priority scheduling
Available at http://micrium.com/
• We extended MicroC/OS-II with
Time-keeping for time-triggered tasks
WCET monitoring
EDF scheduler
Admission control (accounting spare time)
/Mathematics and computer science PAGE 14 6-12-2012
Implementation complexity
Efficiency of monitoring spare capacities:
“executing a periodic task in an other interval
than designated swaps spare capacities.”
Updating spare capacities may propagate
through the entire hyper period…
/Mathematics and computer science PAGE 15 6-12-2012
1 5 6 7 8 9 10 112 43
P3
0 12
P1 P2
reserved capacity (I0)
reserved capacity (I1)
Handling a-periodic requests
Trade-off:
estimated spare capacities vs.
exact spare capacity.
Hard real-time a-periodic tasks:
Pseudo-polynomial test.
Reserve time for the admission control itself
(sporadic server)
Soft real-time tasks run in the background
/Mathematics and computer science PAGE 16 6-12-2012
Extending a commercial RTOS
• MicroC/OS-II is
Event-driven fixed-priority scheduling
Available at http://micrium.com/
• We extended MicroC/OS-II with
Time-keeping for time-triggered tasks
WCET monitoring
EDF scheduler
Admission control (accounting spare time)
/Mathematics and computer science PAGE 17 6-12-2012
Evaluation
• Overheads of event-handling and accounting
Worst-case Off-line scheduled
/Mathematics and computer science PAGE 18 6-12-2012
Recorded example
• Instrumentation of MicroC/OS-II
• Synthetic workload
[2] Holenderski et al., Grasp: Tracing, Visualizing and Measuring the Behavior of
Real-Time Systems, WATERS, July 2010
/Mathematics and computer science PAGE 19 6-12-2012
Borrowing
and lending
Resource
reclaiming
Summary
• Implementation of slotshifting in µC/OS-II:
• Handles task sets with mixed real-time behavior
• Modular run-time mechanisms
• Performance evaluation of RTOS overheads
/Mathematics and computer science PAGE 20 6-12-2012
Future work
• Future work
• Resource sharing between sporadic and periodic tasks
/ Mathematics and computer science PAGE 21 6-12-2012
New offline analysis + New online scheduling mechanism
Recommended