© COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF...

24
© COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real- Time Systems Unai Díaz de Cerio (IK4- Ikerlan) Michael González Harbour (Univ. Cantabria) J. Carlos Palencia (Univ. Cantabria) Juan P. Uribe (IK4-Ikerlan) 22nd International Conference on Real-Time Networks and Sys Versailles, France, October 8-10, 2014

Transcript of © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF...

Page 1: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014

Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems

Unai Díaz de Cerio (IK4-Ikerlan)Michael González Harbour (Univ. Cantabria)J. Carlos Palencia (Univ. Cantabria)Juan P. Uribe (IK4-Ikerlan)

22nd International Conference on Real-Time Networks and SystemsVersailles, France, October 8-10, 2014

Page 2: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 2

Motivation

Context­ Distributed real-time systems­ Response-time schedulability analysis­ EDF scheduling:

• GC-EDF (Global-Clock EDF) Global clock or clock synchronization available

• LC-EDF (Local-Clock EDF) One clock per processor and no clock synchronization available

Problem­ No exact solution for schedulability analysis in distributed systems­ More techniques to reduce the pessimism in the analysis for FP (fixed-

priorities) than for EDF

Page 3: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 3

Motivation

Analysis technique FP GC-EDF LC-EDF

Tindell and Clark, 94 Spuri, 96 Rivas et al., 10Holistic

WCDO Palencia and González Harbour, 98

Palencia and González Harbour, 03

Palencia and González Harbour, 99

WCDOPS X X

X

WCDO : Worst Case Dynamic OffsetsWCDOPS: Worst Case Dynamic Offset with Precedence Schemes

Page 4: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 4

Objectives

Reduce the pessimism of the response time analysis for EDF scheduled systems­ Extending dynamic offsets technique (WCDO) to LC-EDF scheduled systems­ Extending precedence relations technique (WCDOPS) to LC-EDF and GC-EDF

scheduled systems

Page 5: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 5

System model

Distributed system of n task/messages statically allocated in m processors/networks

Tasks/messages (τij) linked making up end-to-end flows (Γi)

Periodic end-to-end flows with minimum time between instances: Ti

Task offset:

Task release jitter:

Task release time interval: ­ t = external event arrival time

ijijwijij RJ ),max( 1

),max( 1bijijij R

ijijij Jtt ,

Page 6: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 6

System model

Task worst case execution time (WCET): Cij

Relative global deadline (related to external event arrival): Dij

Relative local deadline (related to task release in its processor): dij

Global response time (related to external event arrival): Rij

Local response time (related to task release in its processor): rij

di3

Di3

Page 7: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 7

WCDO-EDF (LC-EDF)

Analysis technique FP GC-EDF LC-EDF

Tindell and Clark, 94 Spuri, 96 Rivas et al., 10Holistic

WCDO Palencia and González Harbour, 98

Palencia and González Harbour, 03

Palencia and González Harbour, 99

WCDOPS X X

X

WCDO : Worst Case Dynamic OffsetsWCDOPS: Worst Case Dynamic Offset with Precedence Schemes

Page 8: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 8

WCDO-EDF (LC-EDF)

Find worst case busy period (length t and deadline D, created with the task τik) and calculate the contribution of the tasks to this busy period.

Jobs categorized in 3 sets:­ Set 0: Activations that occur before the busy period and that, even applying its

maximum jitter, cannot be delayed until the busy period.

­ Set 1: Activations that occur before the busy period and can be delayed with an amount of jitter such that they coincide with the beginning of the busy period.

­ Set 2: Activations that occur inside the busy period.

Page 9: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 9

Jobs with deadline

previous to D

Number of jobs in

Set2

Only jobs with deadline

previous to D can contribute

Number of jobs in Set1

WCDO-EDF (LC-EDF)

Maximum contribution when jobs in Set 1 suffer an amount of jitter that they are release at the beginning of the busy period and job in Set 2 suffer an amount of jitter equal to zero:

iji

ijijk

i

ijkijij

i

ijkijijk C

T

dD

T

tCdDH

T

JDtW *1,min*)(*),(

0

Page 10: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 10

WCDOPS-EDF (LC-EDF)

Analysis technique FP GC-EDF LC-EDF

Tindell and Clark, 94 Spuri, 96 Rivas et al., 10Holistic

WCDO Palencia and González Harbour, 98

Palencia and González Harbour, 03

Palencia and González Harbour, 99

WCDOPS X X

WCDO : Worst Case Dynamic OffsetsWCDOPS: Worst Case Dynamic Offset with Precedence Schemes

Page 11: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 11

Precedence relation and activation conflicts

Page 12: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 12

Precedence relation and activation conflicts

Page 13: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 13

Precedence relation and activation conflicts

Activation conflicts: Two tasks are in conflict when their executions are incompatible in the same busy period for the purpose of analyzing task τab .

H-section: Two tasks τij and τik are in the same H-section, for the analysis of τab, if both execute in the same processor as τab with priority equal to or higher than τab and there are no intermediate tasks between them in the same processor and with priority lower than τab. Hij(τab) identifies the H-section to which τij belongs.

Page 14: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 14

Applicability for EDF

Priority depends on absolute deadlines

Absolute deadline change from one job to the next

Contrary to fixed priorities

Activation conflicts between jobs, instead of between tasks

H-sections composed by jobs, instead of tasks

FP EDF

Page 15: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 15

Applicability for GC-EDF

Not useful

Task absolute deadlines are related to the external event arrival Task deadlines ordered Di1 < Di2

No activation conflicts

Page 16: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 16

Applicability for LC-EDF

Task absolute deadlines are related to the task release Task deadlines are not ordered There are activation conflicts

Applicable

Page 17: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 17

WCDOPS-EDF (LC-EDF)

Contribution of each task:­ First job that can be delayed to the busy period:

­ Last job in the busy period that have its deadline previous to the deadline of the task under analysis:

1'

' ,0

i

ijkijijk T

Jp

1

',

'min' ,,

i

ijijk

i

ijkijkDt T

dD

T

tp

Page 18: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 18

WCDOPS-EDF (LC-EDF)

Construct an activation conflict table for the contribution of the end-to-end flow Γi

t1 t2 t3 t4 t5

p=-3 C1 0 0 C4 0

p=-2 C1 C2 0 C4 0

p=-1 C1 C2 0 C4 C5

p=0 C1 C2 C3 C4 C5

p=1 C1 0 C3 C4 C5

p=2 C1 0 C3 0 0

Wi(p=-3) = max(C1, C4)

Wi (p=-2) = max(C1+C2, C4)

Wi (p=-1) = max(C1+C2, C4+C5)

Wi (p=0) = C1+C2+C3+C4+C5

Wi (p=1) = max(C1,C3+C4+C5)

Wi (p=-3) = max(C1, C3)

Wi = Wi (p=-3) + Wi (p=-2) + Wi (p=-1) + Wi (p=0) + Wi (p=1) + Wi (p=2) = max(C1, C4) + max(C1+C2, C4) + max(C1+C2, C4+C5) + C1+C2+C3+C4+C5 + max(C1,C3+C4+C5) + max(C1, C3)

Page 19: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 19

Simulation results

Extensive simulations with random task sets generated with GEN4MAST [Rivas et al., 13] and analysed with MAST

Compared holistic technique [Rivas et al., 10] with the new algorithms WCDO-EDF and WCDOPS-EDF for LC-EDF distributed systems

Page 20: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 20

Simulation results

Processor maximum utilization: Around 9% better utilization for WCDO-EDF Around 16% better utilization for WCDOPS-EDF

Page 21: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 21

Conclusions and future work

Analysis technique FP GC-EDF LC-EDF

Tindell and Clark, 94 Spuri, 96 Rivas et al., 10Holistic

WCDO Palencia and González Harbour, 98

Palencia and González Harbour, 03

Palencia and González Harbour, 99

WCDOPS Not useful

WCDO : Worst Case Dynamic OffsetsWCDOPS: Worst Case Dynamic Offset with Precedence Schemes

Page 22: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 22

Conclusions and future work

Reduced significantly the pessimism of the response time analysis for systems scheduled by LC-EDF.

Improvements come “for free”. Only affect the analysis, not the scheduling policy, nor the system’s architecture.

Some works have slightly improved the WCDO and WCDOPS analysis for fixed-priorities (Mäki-Turja and Nolin, 08; Redell, 04). We have not taken into account for our analysis.

Future work: ­ Analyse previous improvements to try to reduce even more the pessimism.­ Analyse the possibility to develop an exact test that will allow us to quantify

the pessimism of these analysis.

Page 23: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 23

Bibliography

[Palencia and González Harbour, 98] J. C. Palencia and M. González Harbour. Schedulability analysis for tasks with static and dynamic offsets. In Proc. 19th IEEE Real-time Systems Symp., pages 26–37, 1998.

[Palencia and González Harbour, 99] J. C. Palencia and M. González Harbour. Exploiting precedence relations in the schedulability analysis of distributed real-time systems. In Proc. 20th IEEE Real-Time Systems Symp., pages 328–339, 1999.

[Palencia and González Harbour, 05] J. C. Palencia and M. González Harbour. Response time analysis of EDF distributed real-time systems. J. Embedded Comput., 1(2):225–237, 2005.

[Rivas et al., 10] J. M. Rivas, J. J. Gutiérrez García, J. C. Palencia, and M. González Harbour. Optimized deadline assignment and schedulability analysis for distributed real-time systems with local EDF scheduling. In Proc. 8th Int. Conf. on Embedded Systems and Applications, 2010.

[Spuri, 96] M. Spuri. Holistic analysis for deadline scheduled real-time distributed systems. Technical report, INRIA, 1996.

[Tindell and Clark, 94] K. Tindell and J. Clark. Holistic schedulability analysis for distributed hard real-time systems. Microprocessing and microprogramming, 40(2), 1994.

[Rivas et al., 13] J. M. Rivas, J. J. Gutiérrez, and M. González Harbour. Fixed priorities or edf for distributed real-time systems? SIGBED Rev., 10(2):21–21, 2013.

[Mäki-Turja and Nolin, 08] J. Mäki-Turja and M. Nolin. Efficient implementation of tight response-times for tasks with offsets. Real-Time Systems, 40(1):77–116, 2008.

[Redell, 04] O. Redell. Analysis of tree-shaped transactions in distributed real time systems. In Proc. 16th Euromicro Conf. on Real-Time Systems, 2004., pages 239–248.

Page 24: © COPYRIGHT IKERLAN 2014 Adding Precedence Relations to the Response-Time Analysis of EDF Distributed Real-Time Systems Unai Díaz de Cerio (IK4-Ikerlan)

© COPYRIGHT IKERLAN 2014 24

P.º J.M. Arizmendiarrieta, 2

20500 Arrasate-Mondragón (Gipuzkoa)

Tel.: 943 71 24 00

Fax: 943 79 69 44

www.ikerlan.es

Eskerrik asko

Muchas gracias

Thank you

Merci beaucoup