EDA421/DIT171 - Parallel and Distributed Real-Time Systems, Chalmers/GU, 2014/2015 Lecture #12 Updated May 10, 2015 Administrative issues Parallel & Distributed Real-Time Systems This week’s schedule: • Only one lecture (Monday) • No lectures or consultation sessions on Thursday • Presentation time slots on Monday, Wednesday and Thursday Lecture #12 Next week’s schedule: • Guest lecture on Thursday, May 21 @ 08:00 Professor Jan Jonsson – Industrial communication networks (Dr. Roger Johansson, Chalmers) • Regular lecture on Thursday, May 21 @ 10:00 Department of Computer Science and Engineering • Consultation sessions on Monday and Friday Chalmers University of Technology • Presentation time slots on Monday and Thursday Network communication Network communication τ τ T 1 T 2 Hardware platform 1 2 µ µ 1 4 τ τ sender receiver message delay 1 2 message τ 1 t µ µ network 2 3 t τ 2 t 1
EDA421/DIT171 - Parallel and Distributed Real-Time Systems, Chalmers/GU, 2014/2015 Lecture #12 Updated May 10, 2015 Network communication Network communication Message delay: Queuing delay: • Message delays are caused by the following overheads: • The queuing delay for a task is caused by: – Formatting (packetizing) the message – Waiting for a corresponding time slot (TTP/C, FlexRay) – Queuing the message, while waiting for access to medium – Waiting for a transmission token (Token Ring, FDDI) – Transmitting the message on the medium – Waiting for a contention-free transmission (Ethernet) – Notifying the receiver of message arrival – Waiting for network priority negotiation (CAN) – Deformatting (depacketizing) the message – Waiting for removal from priority queue (Switched Ethernet, EDD-D) Formatting/deformatting overheads are typically included in the execution time of the sending/receiving task. Network communication Network communication Transmission delay: How is the message transfer scheduled between tasks assigned to different processors? • The delay for transmitting the message is a function of: • Integrated scheduling: – Message length (bits) N = t frame – Scheduling of tasks and inter-task communication are frame – Data rate (bits/s) R regarded as comparable operations. and – Requires compatible dispatching strategies. – Communication distance (m) L • Separated scheduling: = t prop v – Signal propagation velocity (m/s) – Scheduling of tasks and inter-task communication are performed as separate steps. – Allows for different dispatching strategies. 2
EDA421/DIT171 - Parallel and Distributed Real-Time Systems, Chalmers/GU, 2014/2015 Lecture #12 Updated May 10, 2015 Network communication Network communication Integrated scheduling: Separated scheduling: • Suitable for simple homogeneous systems with known • Suitable for heterogeneous systems or when assignment assignment of tasks to processors of tasks to processors is not always known in advance • Examples: • Motivation: – Time-driven task dispatching + TTP/C network protocol – Transmission delay is zero if communicating tasks are assigned to the same processor – Static-priority task dispatching + CAN protocol – Number of communication links that a message traverses may – Static-priority task dispatching + Token Ring network protocol be a function of the assignment (depends on topology and routing strategy) – Different communication links may employ different message dispatching policies Network communication Network communication How is the message transfer synchronized between Asynchronous communication communicating tasks? • Implementation: • Asynchronous communication: – Network controller chip administrates message transmission and reception (example: CAN, Ethernet) – Sending and reception of messages are performed as – Interrupt handler notifies the receiver independent operations at run-time. • Release jitter: • Synchronous communication: – Sending and receiving tasks synchronize their network – Queuing delays (at sender or in multi-hop network switches) and notification delay cause variations in message arrival time medium access at run-time. – Arrival-time variations gives rise to release jitter at receiving task (which may negatively affect schedulability) – Release jitter is minimized by using offsets for receiving tasks, or by maintaining message periodicity in multi-hop networks 3
EDA421/DIT171 - Parallel and Distributed Real-Time Systems, Chalmers/GU, 2014/2015 Lecture #12 Updated May 10, 2015 Network communication Network communication Asynchronous communication: Synchronous communication queuing delay • Implementation: τ τ transmission delay T 1 T 2 – Network controller chip makes sure message transmission 1 2 and reception occurs within a dedicated time slot in a TDMA bus network notification delay τ – Off-line static scheduling is used for matching the time slot with 1 the execution of sending and receiving tasks t – Queuing and notification delays can be kept to a minimum by instructing the off-line scheduling algorithm to use jitter network minimization as the scheduling objective t τ 2 t release jitter Network communication Network communication Synchronous communication: How is the message transfer imposed with a deadline? • As a separate schedulable entity: τ τ T 1 T 2 – Suitable deadline-assignment techniques must be used 1 2 – Worst-case message delay must be known beforehand dedicated time slot • As part of the receiving task: τ 1 – No explicit deadline needed for message transmission t – May impose release jitter on the receiving task network t τ 2 t 4
EDA421/DIT171 - Parallel and Distributed Real-Time Systems, Chalmers/GU, 2014/2015 Lecture #12 Updated May 10, 2015 Network communication Network communication How is the message transferred onto the medium? Contention-free communication: • Contention-free communication: • One or more dedicated time slots for each task/processor – Senders need not contend for medium access at run-time – Shared communication bus – Examples: TTP/C, FlexRay, Switched Ethernet – Medium access is divided into communication cycles (normally related to task hyper periods to allow for integrated scheduling) • Token-based communication: – Dedicated time slots provide bounded message queuing delays – Each sender using the medium gets one chance to send its – TTP/C, TTCAN ("exclusive mode"), FlexRay ("static segment") messages, based on a predetermined order • One sender only for each communication line – Examples: Token Ring, FDDI – Point-to-point communication networks with link switches • Collision-based communication: – Output and input buffers with deterministic queuing policies in – Senders may have to contend for the medium at run-time switches provide bounded message queuing delays – Examples: Ethernet, CAN – Switched Ethernet, EDD-D, Network Calculus The TTCAN protocol The TTCAN protocol ”Exclusive” – guaranteed service – Based on the CAN protocol Node ”Arbitration” – guaranteed service (high ID), best effort (low ID) – Bus topology A ”Reserved” – for future expansion... – Media: twisted pair CPU/ – 1Mbit/s mem/CC Transmission S S Columns S Basic cycle Node 3 0 Node 1 Node 6 Node 7 Basic cycle 1 Basic cycle 2 A second controller is Basic cycle required to implement the Node 5 3 redundant bus t Node 4 Node 2 Time is global and measured in network time units (NTU’s) 5
EDA421/DIT171 - Parallel and Distributed Real-Time Systems, Chalmers/GU, 2014/2015 Lecture #12 Updated May 10, 2015 The TTP/C protocol The TTP/C protocol – Double channels (one redundant). Bus topology or ”star” (optical) All communication is statically scheduled – Media: twisted pair, fibre Guaranteed service – 10 Mbit/s for each channel Node ”TDMA-round” Node 3 Node Node 1 A 6 ”message slots” CPU/ mem/CC Node Node Node 5 4 2 S S S Node Node 1 4 A Node Node t 2 5 B A network is built on either Node Node 3 6 twin buses or twin stars. Non-periodic messages have to be fitted into static slots by the application The FlexRay protocol The FlexRay protocol ”Static segment” (compare w/ TTCAN ”Exclusive”) – guaranteed service – Double channels, bus or star (even mixed). – Media: twisted pair, fibre ”Dynamic segment” (compare w/ TTCAN ”Arbitration”) Node – 10 Mbit/s for each channel – guaranteed service (high ID), ”best effort” (low ID) A CPU/ mem/CC 63 Node 3 62 Network Idle Time S S Node 1 Symbol window Node 6 Node 7 Guaranteed periodical Guaranteed ”Best-effort” S periodical/ aperiodical B aperiodical 3 A 2 1 Node 5 0 Node Redundant channel can be Static segment Dynamic segment Node 2 4 used for an alternative (m slots) (n mini-slots) schedule Max 64 nodes on a Flexray network. 6
Recommend
More recommend