deferrable scheduling for temporal consistency: schedulability analysis and overhead reduction
Post on 20-Jan-2016
50 Views
Preview:
DESCRIPTION
TRANSCRIPT
1
Deferrable Scheduling for Temporal Consistency: Schedulability Analysis and
Overhead Reduction
Ming Xiong: Lucent Bell LabsSong Han: City University of Hong
KongDeji Chen: Emerson Process
Management
2
Outline• Overview and motivation• Deferrable scheduling alg and
analysis:– Deferrable Scheduling (DS): A fixed
priority scheduling alg for maintaining freshness of real-time data (RTSS05)
– A sufficient condition for DS feasibility (schedulability)
– DS with Hyper-period algs for reducing on-line scheduling overhead
• Performance Studies• Conclusions and Future Work
3
RTDB Model for Maintaining Temporal Validity of Real-Time Data
Real-TimeDatabases
Network
Sensor 1
Sensor 2
Sensor N
. . . .
• A real-time object in RTDBs models a real world entity, e.g., position of an aircraft• Values are sampled by sensors, and propagated to RTDBs• Real-time data in RTDBs must remain fresh in order to react to abnormal situations timely
• Transactions may be triggered to deal with abnormal situations
4
What is Data Temporal Validity in RTDBs?
Temporal Validity: keep data valid relative to real world
Time
Value
X
• Real-time data values change continuously• Data values are sampled periodically• A validity interval is associated with a data value• Within validity interval, a data value is fresh (temporally valid)
– deviation from real world is acceptable
0 1 2 3 4 5
5
Prior Work: Half-Half (HH) & More-Less (ML)
Definition:• X : Real-Time Data • V : Validity Interval
Length• T : Trans Updating X
• P : Period of T
• D : Relative Deadline of T
V
t
P=D
t+V/2 t +Vt
Observation : Data validity can be guaranteed if Period + Relative Deadline Validity LengthHalf-Half : Sample at twice the rate of change (P = D = V/2)
More-Less : P V/2 & D V/2
P=D
D
t t+V/2 t +Vt
PML
HH
6
Intuition of Deferrable Scheduling
• More-Less: Periodic approach that is unnecessarily pessimistic– More-Less uses the worst-case response time (WCRT) of a
transaction as its relative deadline – Period (Ti) = Validity Length (Ti) - WCRT (Ti) – Relative deadline and period are fixed for all instances of a
transaction• DS: Sporadic approach that allows variable separations
and relative deadlines for instances of a transaction– DS uses response time of an instance as the relative
deadline of the instance– Separation(Ti,j, Ti,j+1) = Validity Length(Ti) – ResponseTime(Ti,j+1)– Relative deadline and separation of two instances are varied for all
instances of a transaction• DS increases the average separation of two consecutive
instances
7
Deferrable Scheduling: Example Illustration
Validity Length Vi
ri,0 di,1ri,1
di,1r’i,1
Ti,0 Ti,1
Higher-priority preemption
di,0
Di Di
How to determine the response time of Ti,1 if it completes at di,1?
ri,j: Sampling(Release) time of Ti,j
di,j: Absolute deadline of Ti,j
Vi
di,2
Vi
d’i,2
8
Deferrable Scheduling:Key Steps
• Release time ri,j for transaction instance Ti,j is derived backwards from its deadline di,j :
1) di,j+1 = ri,j + Vi (validity constraint)
2) ri,j+1 = di,j+1 – ResponseTime(Ti,j+1 )
3) ResponseTime(Ti,j+1 ) = HPPreemption(ri,j+1, di,j+1 ) + Ci
HPPreemption(ri,j+1, di,j+1 ) is the total amount of processor demand from higher priority transactions during [ri,j+1, di,j+1 ].
4) HPPreemption(ri,j+1, di,j+1 ) can be derived only if the schedule of all higher priority transactions of Ti up to di,j+1
have been determined
• Note that Eq 2) above can be solved by an iterative algorithm in fixed priority scheduling
9
DS Feasibility Analysis: A Sufficient Condition
• Theorem: Given a synchronous sensor transaction set T, if T can be scheduled by More-Less, then it can also be scheduled by Deferrable Scheduling.– Synchronous means that the first
instances of all transactions are released at the same time
10
Proof Sketch of the Theorem
• T can be scheduled by More-Less: WCRTML (Ti) <= Validity Length (Ti)/2
• T can be scheduled by More-Less: WCRT (Ti) <= WCRTML (Ti)
• WCRT (Ti) <= Validity Length (Ti)/2:T can be scheduled by Deferrable Scheduling.
11
WCRTML (Ti) <= Validity Length (Ti)/2
• True by the definition of More-Less
12
WCRT (Ti) <= WCRTML (Ti)
• Prove by contradiction.• For any 1 < k <= m and
WCRT (Tk) > WCRTML (Tk),• we could find 1 <= l < k and
WCRT (Tl) > WCRTML (Tl).• Tl could be found from the schedule that
produces WCRT (Tk) • But we know:
WCRT (T1) = WCRTML (T1)
13
T can be scheduled by Deferrable Scheduling
• If ri,k+1 <= di,k, then T is schedulable.• According to DS-FP:
ri,k = di,k – Ri,k
di,k+1 = ri,k + Vi
ri,k+1 = di,k+1-Ri,k+1
• We have: ri,k+1 – di,k + Ri,k+1 + Ri,k = Vi
• Since: Ri,k+1 + Ri,k <= 2 WCRT (Ti) <= Vi
• We have: ri,k+1 – di,k <= 0
14
Reducing DS On-line Scheduling Overhead
• Worst-case time complexity of on-line scheduling is O(mVm
2) – It is much higher than More-Less (O(1))
• Time complexity of on-line scheduling can be reduced by making DS based hyper-period schedule (off-line)– Periodic on-line scheduling (O(1))– On-line space overhead to maintain
schedule information is low
15
Deferrable Scheduling with Hyper-period (DESH)
• Criteria for hyper-period: two consecutive instances of a transaction satisfy the validity constraint– Two instances in the same hyper-period– Two instances across two hyper-periods
• Off-line Schedule Adjustment (DESH-SA) Alg– Finds an interval [0, tend] in a partial DS schedule
that has its utilization close to Uest
– Adjusts the schedule backwards from tend so that the schedule in [0, tend] can be repeated on-line without violating the validity constraint
16
DESH-SA Alg
• Finds an idle time t– Repeats the schedule in [0, t] for Ti if Ti and
its higher priority transactions satisfy the validity constraint for the last instance before t and the first instance after t
– Otherwise, • Pushes back the first Ti instance after t and sets t
as its deadline, and computes its release time• If its release time < its prior instance’s absolute
deadline, adjusts the schedule of its prior instance (may incur ripple effect)
17
Performance Studies
• Experiments are conducted by simulation– Single CPU RTDB with all real-time data
in main memory– Sensor and triggered transactions are
generated following an air traffic control application
18
Performance Results: DESH Algs
• DESH-SA has CPU utilization close to DS
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
10 15 20 25 30 50 100 150 200 250 300
Number of Sensor Transacti ons
CPU
Util
izat
ion
More-Less DS(Theoreti cal Est. ) DESH-SA
19
Performance Results:Hyper-period Length
DESH-SA
360
365
370
375
380
385
390
395
10 15 20 25 30 50 100 150 200 250 300
Number of Sensor Transacti ons
Hype
r-pe
riod
Len
gth
(X 1
000
ms)
DESH-SA
20
Conclusions• Introduced Deferrable Scheduling (DS) for
fixed priority transactions maintaining real-time data freshness
• Proposed a sufficient condition for DS feasibility
• Developed DS based algorithm that schedule transactions with hyper-period while reducing on-line scheduling overhead to O(1)
• Experimental results demonstrated that DS significantly outperforms More-Less
21
Future Work
• Open questions:– Is time 0 a critical instant for synchronous
sensor transactions ?– What is a sufficient and necessary condition
for DS feasibility ?– What is processor utilization bound for DS
feasibility ?– How much can DS improve the feasibility of
More-Less ?
top related