scheduling in a time triggered protocol with dynamic
play

Scheduling in a Time-Triggered Protocol With Dynamic Arbitration - PowerPoint PPT Presentation

Scheduling in a Time-Triggered Protocol With Dynamic Arbitration Jens Chr. Lisner lisner@informatik.uni-essen.de ICB / University of Duisburg-Essen Germany ISIE 2005 p.1 Introduction Two methods of arbitration in TDMA-based protocols


  1. Scheduling in a Time-Triggered Protocol With Dynamic Arbitration Jens Chr. Lisner lisner@informatik.uni-essen.de ICB / University of Duisburg-Essen Germany ISIE 2005 – p.1

  2. Introduction Two methods of arbitration in TDMA-based protocols Static arbitration Schedule pre-configured Slots have fixed length Can be implemented in a fault-tolerant way Example: TTP/C, FlexRay (“static segment”) Dynamic arbitration Schedule determined at runtime Slots have dynamic length Fault-tolerant implementation difficult Example: Byteflight, FlexRay (“dynamic segment”) The Tea protocol aims to solve the problem of fault-tolerant dynamic arbitra- tion. ISIE 2005 – p.2

  3. Introduction Tea uses a mixed-mode approach: communication cycle ���������������������������� ���������������������������� regular part extension part ����������������� ����������������� ����������� ����������� Slots r r/ / 2 e 1 2 1 2 1 2 2 � � � � � � � � � � ��������� ��������� ��������� ��������� ����� ����� request phase confirmation phase unused portion Regular part Extension part Static slot length / static schedule Dynamic slot length / dynamic schedule Every controller can request one additional slot in the extension part ISIE 2005 – p.3

  4. Introduction Schedule in extension provided by agreement algorithm slot request Mi = Message of controller i � � � � request vector � � � � regular part slot 1 slot 2 slot (m/2)+1 slot (m/2)+2 � � � � �� �� �� �� M1 M3 M2 M4 A � � � � �� �� �� �� � � � � �� �� �� �� B � � � � �� �� �� �� M2 M4 M1 M3 � � � � �� �� �� �� t � � � � �� �� �� �� request phase confirmation phase Slots are shared by two controllers on two channels Request phase: Contains request bit ( request , no_request ) Confirmation phase: Contains vector of received requests ( request , no_request , corrupted ) Schedule to channels is reversed in confirmation phase ISIE 2005 – p.4

  5. Introduction Architecture for fault-tolerant operation Two completely independent Controller 1 Controller 2 Node controllers reside on one node Double broadcast channel Switches Controllers guard each other by controlling the other’s access to the bus A B Guaranteed fail-silent behavior ISIE 2005 – p.5

  6. Scheduling Policies Number of slots in the extension part is limited → scheduling policy required Common criteria: Common strategies: Arrival time (cycle) First-in-first-out Priority Static priorities Priority-first FIFO-first HW requirements should be minimized. ISIE 2005 – p.6

  7. Basic Algorithm The basic scheduling algorithm consists of three subroutines. end of end of regular part extension part regular part extension part slot 1 slot 2 � � � merge() adjust() adjust() � � � select() select() select() merge : Merges the vector of current requests into the vector with outstanding requests select : Selects the next controller before the start of a new slot adjust : Adjusts the index registers ISIE 2005 – p.7

  8. Basic Algorithm The following algorithm implements a basic round-robin-strategy S k−1 0 1 2 3 4 5 6 7 8 9 10 11 o k 0 1 2 3 4 5 6 7 8 9 10 11 merge() S k 0 1 2 3 4 5 6 7 8 9 10 11 next select() S k 0 1 2 3 4 5 6 7 8 9 10 11 next adjust() S k 0 1 2 3 4 5 6 7 8 9 10 11 tmp ISIE 2005 – p.8

  9. Implementation (Overview) FIFO ⇒ by changing merge Priority ⇒ by changing select FIFO-first ⇒ by changing merge and select Priority-first ⇒ by changing merge and select HW requirements for registers in bit: c + 3 ⌈ log 2 c ⌉ for priority-first c + 2 ⌈ log 2 c ⌉ in all other cases ISIE 2005 – p.9

  10. Controller Faults Neighbor prevents bus access of faulty controller Empty slots are possible, but can be ignored Input to scheduling algorithm is the value unknown Possible solutions: Count as no_request : Clear the respective bit if set Count as request : Set the respective bit if allowed Leave bit unaffected (best solution in connection with channel faults) A faulty controller can block a fault-free neighbour ISIE 2005 – p.10

  11. Channel Faults Problem: Channel faults may lead to the value unknown for requests of fault-free controllers regular part slot 1 slot 2 slot (m/2)+1 slot (m/2)+2 � � � � �� �� �� �� M1 M3 M2 M4 � � � � �� �� �� �� A � � � � �� �� �� �� B � � � � �� �� �� �� M2 M4 M1 M3 � � � � �� �� �� �� t � � � � �� �� �� �� request phase confirmation phase ISIE 2005 – p.11

  12. Channel Faults Solution 1: Double cycle Reverse schedule of controllers in the regular part every two cycles cycle n+1 request phase confirmation phase extension ... ... ... A 1 3 2 4 ... ... ... B 2 4 1 3 cycle n+1 request phase confirmation phase extension ... ... ... A 2 4 1 3 ... ... ... B 1 3 2 4 Fault-free controllers can successfully request a slot within a double-cycle Can cause further delays ISIE 2005 – p.12

  13. Channel Faults Solution 2: Double request phase Reverse schedule of controllers in two consecutive request phases request phase request phase confirm. phase extension ... ... ... ... A 1 3 2 4 2 4 ... ... ... ... B 2 4 1 3 1 3 Request of fault-free controllers are guaranteed within a cycle Cycle length grows by c 2 static slots permanently ISIE 2005 – p.13

  14. Channel Faults Solution 3: Additional link between both controllers in a node Controller 1 Controller 2 request ISIE 2005 – p.14

  15. Channel Faults Solution 3: Additional link between both controllers in a node Controller must also provide request for neighbor (extra bit necessary in request phase) Both controllers must be scheduled for different channels Request of fault-free controllers are guaranteed within a cycle No need to extend cycle ISIE 2005 – p.15

  16. Conclusion A fault-tolerant solution for dynamic allocation in time-triggered protocols is provided by the Tea protocol Fault-tolerance can be assured Dynamic allocation requires dynamic scheduling Well known policies are available with low effort in hardware registers Requests can be guaranteed in case of channel faults Requests cannot be guaranteed for a fault-free neighbor of a faulty controller ISIE 2005 – p.16

Recommend


More recommend