Title: Translating Offline Schedules into Task Attributes for Fixed Priority Scheduling
1(No Transcript)
2Combining Off-line Schedule Construction and
Fixed Priority Scheduling in Real-Time Computer
Systems
3Outline
- Real-Time Systems
- Off-line vs. Fixed Priority Scheduling (FPS)
- Problem Formulation
- Application Areas
- Proposed Solution
- Summary
4Real-Time Systems
-
- Computer systems in which the correctness of the
system depends not only on the logical
correctness of the computations performed, but
also on the time factors (Stankovic et. al.) - Hard
- no deadlines may be missed (avionics, nuclear
power plantsetc) - Soft
- some deadlines may be missed (multimedia
applications) - In between
- weakly hard RTS (Bernat et. al.)
- n of m consecutive deadlines may be missed
5Real-Time Systems
- Resources
- one or several processors
- network (if distributed RTS)
-
- Tasks
- periodic
- an infinite sequence of invocations (instances or
jobs) - non-periodic
- aperiodic, sporadic, etc
- Scheduler
- makes the decision which task to execute (on
which processor) at each point in time based on
the scheduling policy
6Real-Time Systems
- Scheduling policy
- This talk
- off-line (table driven) scheduling
- pre-runtime allocation of tasks to processors
- priority-driven (on-line) scheduling
- fixed priority scheduling (FPS)
- dynamic priority scheduling (e.g., EDF)
in hard real-time systems
7Off-line (table driven) scheduling
- off-line allocation of time-slots to tasks
- run-time dispatcher selects task from scheduling
tables
A
B
C
D
8Off-line (table driven) scheduling
- off-line allocation of time-slots to tasks
- run-time dispatcher selects task from scheduling
tables -
- ? misc. complex constraints (instance
separation, jitter, engineering practice
constraints ) - ? predictability
- ? determinism
- ? inflexible, task executions fixed
- ? need to know all task attributes before
run-time
9Fixed Priority Scheduling (FPS)
- schedulability test performed off-line
guarantees - on-line servers to handle non-periodic events
- scheduling decisions made at run-time
A
B
C
D
A
B
D
B
C
10Fixed Priority Scheduling (FPS)
- schedulability test performed off-line
guarantees - on-line servers to handle non-periodic events
- scheduling decisions made at run-time
- ? widely used (automotive industry, network
scheduling - CAN) - ? flexible
- ? simple run-time mechanism
- ? small run-time overhead
- ? ability to handle complex constraints
- ? additional constraints new
schedulability tests
11Proposed solution
- We want to combine the advantages provided by
both - methods that transform off-line schedules into
attributes for fixed priority scheduling - execution of fixed priority tasks reenacts
original off-line schedule at run-time, if
scheduled by FPS
12Proposed solution
FPS
Off-line scheduling
- ? ability to handle complex constraints ?
predictability
? simple run-time mechanism ? run-time flexibility
FPS
13Application scenarios
Off-line sched. based system
We have
Our method
FPS schedule
14Application scenarios
FPS system
We have
We want
FPS system
FPS schedule
15Outline
- Real-Time Systems
- Off-line vs. Fixed Priority Scheduling (FPS)
- Problem Formulation
- Application Areas
- Proposed Solution
- Summary
16Off-line to FPS transformation
- Method to transform off-line schedules into
attributes for fixed priority scheduling
overview - Input off-line schedule and target windows
(feasible time intervals for task executions) - derive sequences of task executions from
overlapping target windows - derive priority inequalities
- solve inequalities by Integer Linear Programming
(ILP) - Output minimum number of FPS tasks and priority
levels
17Off-line to FPS transformation
Target Windows feasible time intervals for
task executions under FPS
ex periodic task with simple constraint (dl)
18Off-line to FPS transformation
Target Windows feasible time intervals for
task executions under FPS
ex periodic task with an instance separation
constraint
A
A
19Off-line to FPS transformation
- first task set with original constraints and
off-line schedule
- split off-line schedule into target windows
- derive sequences of instances (each start of
TW)
TW(A)
TW(B)
TW(C)
20Off-line to FPS transformation
- first task set with original constraints and
off-line schedule
- split off-line schedule into target windows
- derive sequences of instances (each start of
TW)
A
TW(A)
B
B
TW(B)
C
TW(C)
SEQk
ltA gt
B ordered
ltBAgt
21Off-line to FPS transformation
- first task set with original constraints and
off-line schedule
- split off-line schedule into target windows
- derive sequences of instances (each start of
TW)
A
TW(A)
B
B
TW(B)
C
TW(C)
tk
SEQk
ltA gt
B ordered
ltBAgt
22Off-line to FPS transformation
- first task set with original constraints and
off-line schedule
- split off-line schedule into target windows
- derive sequences of instances (each start of
TW)
A
TW(A)
B
TW(B)
C
C
TW(C)
SEQk1
ltC gt
A ordered
ltACgt
23Off-line to FPS transformation
- first task set with original constraints and
off-line schedule
- split off-line schedule into target windows
- derive sequences of instances (each start of
TW)
- derive priority inequalities to reflect order
of execution in the sequences
gt priority(B)gtpriority(A)
24Off-line to FPS transformation
- first task set with original constraints and
off-line schedule
- split off-line schedule into target windows
- derive sequences of instances (each start of
TW)
- derive priority inequalities to reflect order
of execution in the sequences
- problem inconsistent priorities for instances
of same task (not all off-line schedules can be
expressed by FPS)
25Off-line to FPS transformation
- first task set with original constraints and
off-line schedule
- split off-line schedule into target windows
- derive sequences of instances (each start of
TW)
- derive priority inequalities to reflect order
of execution in the sequences
- problem inconsistent priorities for instances
of same task (not all off-line schedules can be
expressed by FPS)
- solution modify the problem
- treat task instances as new tasks artifacts
- which ones?
- potentially many artifacts?
- use Integer Linear Programming to
- solve priority inequalities
- minimize number of artifacts
26ILP formulation
Input - priority inequalities, total nr. of
instances Goal function min G
fps_tasks original_tasks (
instances(Ti) - 1)bi Subject to
constraints transformed from the priority
inequalities 1 create artifacts for
Tis instances bi 0 leave
unchanged Output - bi (which tasks to split)
- priorities for fps_tasks
27Temporal analysis
- transformed FPS tasks execute within derived
target windows at run-time - order of execution specified in off-line schedule
preserved? at run-time, if required by original
constraints - ? exact reenaction of off-line schedule by
adjusting target windows
28So far
Target windows
Offline schedule
input
instance sequences
priority inequalities
FPS tasks
output
guaranteed
29So far
- resolved attribute assignment problem in FPS for
multiple complex timing constraints - can be used in CAN scheduling
- scheduling messages with complex timing
requirements - better results than processor scheduling
- legacy systems
- upgrade/migrate while preserving constraint
guarantees - optimization techniques to minimize costs
- if an off-line schedule exists, we can transform
it to FPS!
30So far
- FPS
- ability to handle complex constraints
- predictability
- ? simple run-time mechanism
- ? run-time flexibility
v
v
v
?
31Next handling non periodic events?
- Usually done by using FPS servers
- non-capacity preserving
- e.g., background scheduling, polling server
- capacity preserving
- e.g., deferrable servers, slack stealing
- RM based analysis exists
- our task model is not RM based!
- no optimal server exists
- our goal
- use servers to provide good service to
non-periodic tasks - use/tweak existing ones?
- develop new ones?
- still guarantee complex constraints on periodic
tasks
32Using non-capacity preserving servers
- Easy server does not suspend itself
- Off-line
- include server in off-line schedule construction
- together with complex constrained periodic tasks
- derive FPS attributes for both server and
periodic tasks - On-line
- if server active and non-periodic request pending
- WCET(server)server capacity
- else
- BCET(server) 0
33Using capacity preserving servers
- Difficult server may execute unpredictable at
any time during period - difficult to include in off-line schedule
construction - additional interfering instances to the sequences!
34Using capacity preserving servers
- Difficult server may execute at any time during
period - difficult to include in off-line schedule
construction - additional interfering instances to the sequences!
A
TW(A)
B
S
TW(B)
C
C
TW(C)
SEQk1
ltC gt
A ordered
ltACgt
35Using capacity preserving servers
- Solution
- take into account potential interference?
- pessimistic over constraining the LP
formulation - provide users set of deadlines to prevent
undesired interference - assign server highest feasible priority while
guaranteeing completion before new deadlines
dl(B)
A
TW(A)
B
S
S
TW(B)
C
C
TW(C)
SEQk1
ltC gt
A ordered
ltACgt
36Example
constraints (for LCM)
polling server (S,T6,C1)
37Example
constraints (for LCM)
polling server (S,T6,C1)
38Example
constraints (for LCM)
polling server (T6,C1)
39Inequalities
prio(S)gtprio(C)
40Inequalities
prio(S)gtprio(C)
41Inequalities
prio(S)gtprio(C)
prio(A)gtprio(C)
prio(C)gtprio(B)
prio(S)gtprio(B)
42Inequalities
prio(S)gtprio(C)
prio(A)gtprio(C)
prio(C)gtprio(B)
prio(S)gtprio(B)
prio(B)gtprio(C)
43Inequalities
prio(S)gtprio(C)
prio(A)gtprio(C)
prio(C)gtprio(B)
prio(S)gtprio(B)
prio(B)gtprio(C)
44Inequalities
prio(S)gtprio(C)
prio(A)gtprio(D)
prio(C)gtprio(B)
prio(S)gtprio(B)
prio(B)gtprio(C)
prio(A)gtprio(B)
45Inequalities
prio(S)gtprio(C)
prio(A)gtprio(D)
prio(C)gtprio(B)
prio(S)gtprio(B)
prio(B)gtprio(C)
prio(A)gtprio(B)
prio(A)gtprio(S)
46Inequalities
prio(S)gtprio(C)
prio(A)gtprio(C)
prio(C)gtprio(B)
prio(S)gtprio(B)
prio(B)gtprio(C)
prio(A)gtprio(B)
prio(A)gtprio(S)
47Inequalities
prio(S)gtprio(C)
prio(A)gtprio(C)
prio(C)gtprio(B)
prio(S)gtprio(B)
prio(B)gtprio(C)
prio(A)gtprio(B)
prio(A)gtprio(S)
48Inequalities
prio(S)gtprio(C)
prio(A)gtprio(C)
prio(C)gtprio(B)
prio(S)gtprio(B)
prio(B)gtprio(C)
prio(A)gtprio(B)
prio(A)gtprio(S)
49Example
FPS tasks
Off-line scheduled tasks
50Example
J1
J2
J2
S (prio 4)
A (prio 5)
A
A
B (prio 2)
B
B
B
C1 (prio 3)
C1
C1
C2 (prio 1)
C2
C3 (prio 1)
C3
51Example
J1
J2
J2
S (prio 4)
A (prio 5)
A
A
B (prio 2)
B
B
B
C1 (prio 3)
C1
C1
C2 (prio 1)
C2
C3 (prio 1)
C3
52Example
53Example
guaranteed
54Conclusions and future work
- Conclusions
- Transforming off-line scheduled tasks into FPS
tasks to reenact original off-line schedule at
run-time - create artifacts if attribute inconsistency
- ILP used to minimize the number of artifacts
- non-periodic events handled by existing FPS
servers - periodic servers include into off-line schedule
construction - capacity preserving servers provide means to
use while guaranteeing periodic task constraints - Ongoing work
- include fault tolerant aspects
55(No Transcript)