Title: Synchronization Protocols in EndtoEnd Scheduling
1Synchronization Protocols in EndtoEnd Scheduling
2Scope
- Job-shop model
- Each task needs to execute on a set of processors
in a certain order - Each task may require a different order
- Problems in End-to-End scheduling
- Priority assignment
- Assign fixed priorities to tasks so that the
system is schedulable - Synchronization of tasks
- Control the releases of subtask instances
(non-first subtasks) - Schedulability analysis
- For a given priority assignment and a given
synchronization protocol, whether every instance
of each task meets its deadline
3The Synchronization Problem
- Given that
- Priorities are assigned to subtasks in a task
chain using some fixed priority assignment
algorithm - How do we coordinate the release of subtasks in a
task chain so that - Precedence constraints among subtasks are
satisfied - subtask deadlines are met
- end-to-end deadlines are met
4Synchronization Protocols
- Direct Synchronization (DS) Protocol
- Simple and straightforward
- Phase Modification (PM) Protocol
- Proposed by Bettati
- Used by flow-shop tasks
- Extension called Modified Phase Modification
(MPM) Protocol - Release Guard Protocol
- Proposed by Sun
5Synchronization Protocol - Example
P1
P2
(4,2)
T1
(6,2)
T2,2
(6,2)
T2,1
(6,3)
T3
Ti,j jth subtask of task Ti
Task T3 has a phase of 4 time units
(period,execution time)
Period relative deadline of parent task
6Direct Synchronization Protocol
- Greedy strategy
- On completion of subtask
- A synchronization signal sent to the next
processor - Successor subtask competes with other
tasks/subtasks on the next processor
7Direct Synchronization Illustrated
T1
T2,1
On P1
On P2
T2,2
T3 misses deadline
Phase of T3
T3
8Phase Modification Protocol
- Proposed by Bettati
- Release subtasks periodically
- According to the periods of their parent tasks
- Each subtask given its own phase
- Phase determined by subtask precedence constraints
9Phase Modification Protocol Illustrated (1/2)
T1,1
T1,2
T1,3
T1,1
p1
T1,2
p1
T1,3
p1
Phase of T1,2
Phase of T1,3
Actual response time
Estimated worst case response time
10Phase Modification Protocol Illustrated (2/2)
T1
T2,1
On P1
On P2
Phase of T2,2
T2,2
Phase of T3
T3
11Phase Modification Protocol - Analysis
- Periodic Timer interrupt to release subtasks
- Centralized clock or strict clock synchronization
- Task overruns could cause Precedence constraint
violations
12Modified PM Protocol Illustrated (1/2)
T1,1
T1,2
T1,3
T1,1
p1
Overrun ?
T1,2
p1 ?
Actual response time
Estimated worst case response time
13Modified PM Protocol Illustrated (2/2)
T1
Synch signal delayed
T2,1
On P1
On P2
T2,2
Phase of T3
T3
14Modified PM Protocol - Analysis
- MPM protocol behavior the same as PM under ideal
conditions - Ideal conditions Clocks synchronized, no
overrun - MPM protocol does not need clock synchronization
- Precedence constraints preserved even in the case
of overruns - Upper bound on End-to-End Response time of task Ti
Ri,k is the response time of the kth subtask of
Ti ni is the number of subtasks for the task Ti
- Lower bound on End-to-End Response time of task
Ti
Actual Response time of nith subtask
- Lower bound high, hence high average EER time
15Release Guard Protocol
- Proposed by Sun
- A guard variable release guard - associated
with each subtask - Release guard used to control release of each
subtask - Contains next release time of subtask
- Synchronization signals just like MPM
- Release guard updated
- On getting synchronization signal
- During idle time
16Release Guard Protocol Illustrated
T1
T2,1
On P1
On P2
g1,2 4610
g1,2 9
T2,2
Idle time detected
Phase of T3
T3
17Release Guard Protocol - Analysis
- Shares the same advantages as MPM
- Upper bound on EER still the same as MPM
- Since upper bound on release time enforced by
release guard
Ri,k is the response time of the kth subtask of
Ti ni is the number of subtasks for the task Ti
- Lower bound on EER less than that of MPM
- If there are idle times
- Results in lower average EER
18Comparison of Protocols
19Classification of Protocols
Synchronization Protocols
Without execution control
With execution control
DS
PM
MPM
RG
Task release controlled by predecessor
processor by delaying the synch signal
Task release controlled by same processor by
using guard variables
Phase modification
20References
- Synchronization Protocols in Distributed
Real-Time Systems, - Jun Sun and Jane Liu, ICDCS 96
- Fixed Priority End-to-End Scheduling in
Distributed Real-Time Systems, - Jun Sun, PhD Thesis