Real-Time Systems Hermann Härtig Real-Time Communication (following Kopetz, Liu, Schönberg, Löser)

Similar documents
Real-Time (Paradigms) (51)

Earliest Due Date (EDD) [Ferrari] Delay EDD. Jitter EDD

Chapter 4. Medium Access Control. IN2P3 Octobre 2002 Jean-Pierre Thomesse

From Fieldbus to toreal Time Ethernet

Comparison of FlexRay and CAN-bus for Real-Time Communication

LIN (Local Interconnect Network):

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006

Module 15: Network Structures

Chapter 14: Distributed Operating Systems

Unit of Learning # 2 The Physical Layer. Sergio Guíñez Molinos sguinez@utalca.cl

Chapter 16: Distributed Operating Systems

Predictable response times in event-driven real-time systems

Introduction to RACE FUELS Hans-Christian von der Wense Munich, Germany

Generic term for using the Ethernet standard in automation / industrial applications

Vorlesung Kommunikationsnetze Fieldbus Systems

Local Area Networks transmission system private speedy and secure kilometres shared transmission medium hardware & software

Ring Local Area Network. Ring LANs

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: wireless embedded network

Bluetooth in Automotive Applications Lars-Berno Fredriksson, KVASER AB

174: Scheduling Systems. Emil Michta University of Zielona Gora, Zielona Gora, Poland 1 TIMING ANALYSIS IN NETWORKED MEASUREMENT CONTROL SYSTEMS

Overview of Network Hardware and Software. CS158a Chris Pollett Jan 29, 2007.

Local Interconnect Network Training. Local Interconnect Network Training. Overview

Distributed Real-Time Systems (TI-DRTS) Track 2. CAN-BUS Introduction. Version Ref. VECTOR application note & Motorola note

Remote I/O Network Determinism

Final for ECE374 05/06/13 Solution!!

Quality of Service versus Fairness. Inelastic Applications. QoS Analogy: Surface Mail. How to Provide QoS?

Mixed-Criticality Systems Based on Time- Triggered Ethernet with Multiple Ring Topologies. University of Siegen Mohammed Abuteir, Roman Obermaisser

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

Network Performance Optimisation and Load Balancing. Wulf Thannhaeuser

Ethernet, VLAN, Ethernet Carrier Grade

PART II. OPS-based metro area networks

Vehicle data acquisition using CAN By Henning Olsson, OptimumG

In-Vehicle Networking

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

EXAMPLES AND PROBLEMS. Competence Based Education Internet Protocols

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

Computer Networks: LANs, WANs The Internet

EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

CSE 123A Computer Networks

Worst Case Analysis - Network Calculus

Computer Networks CS321

COMPUTERS ARE YOUR FUTURE CHAPTER 7 NETWORKS: COMMUNICATING AND SHARING RESOURCES

PLANEAMENTO E GESTÃO DE REDES INFORMÁTICAS COMPUTER NETWORKS PLANNING AND MANAGEMENT

CSCI 362 Computer and Network Security

Agenda. Distributed System Structures. Why Distributed Systems? Motivation

Introduction to LAN/WAN. Network Layer

Announcements. Midterms. Mt #1 Tuesday March 6 Mt #2 Tuesday April 15 Final project design due April 11. Chapters 1 & 2 Chapter 5 (to 5.

Based on Computer Networking, 4 th Edition by Kurose and Ross

- Hubs vs. Switches vs. Routers -

Random Access Protocols

RTT 60.5 msec receiver window size: 32 KB

Software Stacks for Mixed-critical Applications: Consolidating IEEE AVB and Time-triggered Ethernet in Next-generation Automotive Electronics

Multimedia Requirements. Multimedia and Networks. Quality of Service

What You Will Learn About. Computers Are Your Future. Chapter 8. Networks: Communicating and Sharing Resources. Network Fundamentals

Real-Time Scheduling 1 / 39

LAN Switching Computer Networking. Switched Network Advantages. Hubs (more) Hubs. Bridges/Switches, , PPP. Interconnecting LANs

Lecture 8 Performance Measurements and Metrics. Performance Metrics. Outline. Performance Metrics. Performance Metrics Performance Measurements

Quality of Service in the Internet. QoS Parameters. Keeping the QoS. Traffic Shaping: Leaky Bucket Algorithm

Quality of Service in Industrial Ethernet Networks

Understanding Latency in IP Telephony

Ethernet. Ethernet. Network Devices

Controlled Random Access Methods

EE4367 Telecom. Switching & Transmission. Prof. Murat Torlak

QoS Parameters. Quality of Service in the Internet. Traffic Shaping: Congestion Control. Keeping the QoS

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD


Definition. A Historical Example

The Temporal Firewall--A Standardized Interface in the Time-Triggered Architecture

Latency on a Switched Ethernet Network

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

Welcome to the Introduction to Controller Area Network web seminar My name is William Stuart, and I am a Applications Engineer for the Automotive

What is CSG150 about? Fundamentals of Computer Networking. Course Outline. Lecture 1 Outline. Guevara Noubir noubir@ccs.neu.

WAN Data Link Protocols

Interconnection Networks. Interconnection Networks. Interconnection networks are used everywhere!

Lecture 16: Quality of Service. CSE 123: Computer Networks Stefan Savage

LOW COST AUTOMOTIVE NETWORKS. Local Interconnect Network (LIN)

A Real-time Ethernet Prototype Platform for Automotive Applications

Application Note. Windows 2000/XP TCP Tuning for High Bandwidth Networks. mguard smart mguard PCI mguard blade

19 Comparison of Ethernet Systems

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

524 Computer Networks

Performance Analysis of Time-Triggered Ether-Networks Using Off-The-Shelf-Components

Sources: Chapter 6 from. Computer Networking: A Top-Down Approach Featuring the Internet, by Kurose and Ross

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

EPL 657 Wireless Networks

TCOM 370 NOTES LOCAL AREA NETWORKS AND THE ALOHA PROTOCOL

In-Vehicular Communication Networking Protocol

Introduction to. LIN (Local Interconnect Network)

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Communication Networks. MAP-TELE 2011/12 José Ruela

RFC 2544 Testing of Ethernet Services in Telecom Networks

NQA Technology White Paper

Transcription:

Real-Time Systems Hermann Härtig Real-Time Communication (following Kopetz, Liu, Schönberg, Löser) 05/02/15

Contents Overview IO Busses: PCI Networks as schedulable resources: Priority / Time-Driven / Weighted Round Robin Priority Based Field: CAN/Token Ring Weighted Round Robin in Wide Area Ethernet in RT: Shaping TT-Ethernet WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 2

General Scenario backbones routers real time bus / feld bus real-time computer real-time computer real-time computer feld bus IO bus sensors SPS controller actuator NC disk controller feld bus WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 3

Purpose of a real-time network Deliver communication services to the requesting nodes reliably, securely, efciently and timely lower bound for bandwidth upper bound for latency and jitter real-time node A real-time network real-time node B WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 4

Typical requirements Short data in control applications Large data in media applications Short periods (ms) monitoring, feedback control Fast aperiodic (ms) alarms Non real-time data confguration, logs Multicast Predictability in the presence of faults WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 5

Intra-Node communication: IO bus (PCI) All data transfers share the memory bus Memory bus conficts PCI devices start transfers when data is available CPU PCI CPU-Memory-accesses are infuenced by PCI devices memory bus applications are slowed down by external load memory Slowdown factor F: (ET: execution time) ET under external load/et without any external load application-specifc depends on memory access pattern obtained by measurements attempts to statically predict WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 6

Some measurements Source: Dissertation Sebastian Schönberg (see our Web-Pages) WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 7

Intra-Node communication: PCI bus PCI bus specifcation does not prevent real-time implementation Arbitration responsible for granting bus to devices Current implementations use round-robin arbitration Telecom Systems PCI bus for control data TDMA bus for real-time data WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 8

Intra-Node communication: PCI bus Alternatives (research proposals) real-time capable PCI bus arbiter Assign individual share of the PCI bus to devices Enforce reservation Give unused bandwidth to time-sharing devices RT-Bridges Between device and bus Enforces bandwidth restriction Memory Bus in MultiCore systems: active area of research WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 9

Networks as schedulable resources Analogous to CPU scheduling: time driven priority driven (Weighted Round Robin) Analogy: WCET: Amount of trafc / message transmission time Periodic tasks: periodic messages messages are usually non-preemptive!! Deadline: max delay Admission: connection establishment Schedulers in switches or distributed on nodes WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 10

Examples Fieldbus: CAN, Token Ring: priority based scheduler TTP/Flexray/TT-Ethernet: time driven scheduling Switch: (Delay EDD) Weighted Round Robin (neither priority nor time driven!) WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 11

Intra-Node communication: feld busses Situation is moving Smart sensors, actors Wireless lans feld bus real-time real-time real-time real-time computer computer computer computer sensors actuator SPS NC WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 12

Fieldbus Networks for process control, factory automation, cars, avionics, X-by-wire, embedded applications Networks are typically called feldbusses: collapsed network stacks (application services access the data link directly) real-time transport short application messages (no need for fragmentation and reassembling) often a bus, hence a single broadcast domain, no routing Image source: Microsoft Clip-Art Gallery WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 13

Multiple access to shared medium CSMA/CD shared ethernet CSMA/CR or CSMA/BA with priorities (CAN) Token Ring with priorities TDMA WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 14

CAN controller area network Bosch GmbH, Version 2.0 released in 1991 ISO Standards 11519 (94) and 11898 (95) used in automotive industry, process control, manufacturing automation, embedded application domains cost-efective CSMA/BA: carrier sense multiple access/bitwise arbitration WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 15

Bus arbitration with CAN (priority based) CSMA/BA (carrier sense multiple access/bitwise arbitration) Bit-wise collision resolution using message identifers, sent from HSB to LSB Wired "and", implemented with bus drivers 0 - Dominant level 1 - Recessive level 1 2 3 bus Node stops if a 0 is seen when sending a 1 WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 16

CAN message id: 11 control: 6 data up to: 64 crc: 16 various: 11 Bit stufng to allow synchronization at bit level after 4 '0's or 4 '1's: dummy 1 or 0 Transmission time of a message in bit-times: => 13+34+databits+ (34+databits-1)/4 Overhead: 44 Bits +... WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 17

CAN performance Transmission rate from 5KBit/s to 1MBit/s Bit-synchronized bus access Bus length depends on transmission rate 40m with 1MBit/s, 1000 with 50KBit/s transmission rate increases with shorter busses... or with increased speed of light 2048 priorities (11 Bit) in version A, >500 Mio priorities (29 Bit) in version B Short messages (0-8 Byte) Efciency depends on msg length: 0%..47% WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 18

Medium access control using a token ring Messages follow a logical ring Token required as permission to send (round robin scheduling) node A (token) sending node B listening real-time network node D listening node C listening WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 19

Token Ring with priorities (simplifed!!) Frames: Data, Token Token: Token Priority feld, Reservation Priority feld Data: Data feld, Reservation Priority feld Token can be taken only, if Token Priority is lower than priority feld in outgoing data frame Reservation Priority is set to highest priority of waiting messages that are passed by packet Upon arrival of a data frame at its sender, a token is generated with priority is set to the data frame s priority reservation feld WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 20

More on Token Ring Not necessarily a strict ring Functional Parameters Maximum token holding time at each node Rings: resulting maximum token rotation time Problems: lost tokens duplicated tokens WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 21

Example 5 6 Notation: 0 Data, ResPrio T-Prio, ResPrio 4 0,1,4,6 want to send. Token T-0,0 arrives at 0 NodeNr = Prio High number high prio 1 0 sends: Data,0 1 waits, changes Resprio: Data,1 4 waits, changes ResPrio: Data, 4 6 waits, changes ResPrio: Data, 6 5 does nothing 0 creates token: T-6, 0 1 waits, changes ResPrio: T-6, 1 4 waits, changes ResPrio: T-6, 4 6 claims token, sends: Data, 4 6 creates token: T-4, 0 1 waits, changes ResPrio: T-4, 1 4 sends, sets ResPrio Data, 1 4 creates token: T-1, 0 1 sends, Data, 0 1 creates token: T-0, 0 WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 22

Time division multiple access (TDMA) Divide Time periodically into Slots Allocate Slots Slots: Cooperative (BUT: failures) enforced WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 23

Kopetz: event vs. time triggered Kopetz operator alarm monitor Bus: 100 KBit/s N N N N N N N N N N N N controlled object 10 interface nodes 40 sensors/node Each node supervises 40 alarm conditions and sends messages Deadline: 100 ms to notify operator Communication bandwidth: 100 kbits/second WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 24

Kopetz: event triggered (ex. CAN) Kopetz operator alarm monitor Bus: 100 KBit/s N N N N N N N N N N N N controlled object 10 interface nodes 40 sensors/node Send message as soon as alarm condition is seen size = alarm name (8 Bit) + CAN overhead (44+4 Bit) = 56 Bit allows 180 messages within deadline of 100ms worst case requirement: 400 messages... WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 25

Kopetz: event triggered (TDMA bus) Kopetz operator alarm monitor Bus: 100 KBit/s N N N N N N N N N N N N controlled object 10 interface nodes 40 sensors/node Each node sends state message every 100ms size: Data feld (40 Bit) + overhead (44) + gap (4) = 88 Bit allows 110 messages within 100ms period but, just 10 required! i.e. 10 % of bandwidth WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 26

TT Ethernet as an example for TDMA Participants request slots Switch enforces slots Based on sparse time (determinism) See propaganda slides by TT-Tech WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 27

Real-Time communication in WANs Jane Liu Principles fnd connection (reservations) determine local properties at each node of connection depending on node-local scheduler add up delays take care for jitter (provide bufer, trafc shapers) Example in this lecture: Weighted Round Robin Other: Dynamic, EDF: e.g., Delay-EDD Service Discipline See text books WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 28

Weighted Round Robin Jane Liu Principle: Message passes multiple nodes from source to dest. During set up (admission) a weight(wt) is assigned to each input bufer of all involved switches Scheduler at each node Visits input bufers in round robin processes wt number of units of messages at each bufer per round WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 29

Scheduling example: Weighted Round Robin Jane Liu Messages: e i max length of message in units p i Period: minimum inter-arrival time ρ number of hops nodes passed by message from source to destination how to guarantee Bandwidth (p i,e i ) and end-to-end delay WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 30

Scheduling example: reservation Jane Liu (p,e) (p,e) (p,e) (p,e) (p,e) (p,e) WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 31

Scheduling example: Weighted Round Robin Jane Liu In each round, wt_i message units are taken from input i Round of fxed length Assign wt sufcient for (p,e) Examples RL==16 : - (8, 1) not possible - (16, 4) NoR: 1 wt = 4 - (32, 4) NoR: 2 wt = 2 - (32, 5) NoR: 2 wt = 3 - (31, 5) NoR: 1 wt = 5 (pi, ei) i wt_i General: - RL <= min pi - Σ wti <= RL - wti >= ei / pi / RL WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 32

Scheduling example: Weighted Round Robin Jane Liu Nodes: wt i each connection is given wt i slots per round. RL round length (switch design parameter) e i max length of message in units if wt i =1 e i rounds at the switch are needed Σ wt i <= RL Round lengths? Weights? Delay? Per Node, end to end? WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 33

Scheduling example: weighted round robin Jane Liu Some Calculations: Delay per Node: RL * ( e i / wt i ) RL is bound by delay guarantees of Node for example, to guarantee that messages are transmitted within a period: RL <= min p i wt i >= e i / p i / RL end to end delay (pipelined execution ): ( e i / wt i + ρ -1) * RL WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 34

Summary Field busses Scheduling analysis analog to processors Use time driven / static priority / table based scheduling Switched LANs WANs Dynamic Use local scheduling disciplines in switches/routes to enforce system wide behaviour Admission for connections required WS 2014/15 Real-Time Systems, Real-Time Communication / Hermann Härtig 35