Title: Real Time Systems
1Real Time Systems
- Chapter 6 Real-Time Communication
Dr Shamala Subramaniam
2Real-Time CommunicationIntroduction
- Conventional Communication Systems
- Bandwidth and throughput are important
- Long delays reduce quality of service
- Videoconferencing
- Cellular Communication
- Hard Real-Time Systems
- Delivery of content by specific deadline is
important - Internal communication (between life support
system components) - External communication (remote manipulation)
3Real-Time Sources Generates Traffic
- Constant Rate fixed packet size and at periodic
intervals - Variable rate fixed packet size and variable
interval or variable packet size at fixed
interval. - Bursty traffic require greater demands on buffer
space - Talkspurts
Silence
4Communications Media
- Electrical Medium
- Optical Fibers
- Wireless
5Network Topologies
- Network Topology Affects the system response time
Reliability. The following features are
important - Diameter the maximum distance (number of hops)
between any two nodes as a function of the number
of nodes. Ideally it should increase slowly. - Node Degree The number of edges adjacent to
each node and determines the number of I/O ports
per node and the number of links in the system. - Fault Tolerance the network can withstand the
failure of individual links and nodes while still
remaining functional.
6Network Topology (cont.)
- Point-to-Point
- Dedicated links
- If no connection, utilize the intermediate nodes
- Shared (Broadcast)
- Nodes have access to all communication channels
- Only one node can transmit at any time over a
channel
7Real-Time CommunicationIntroduction
- Traffic Characteristics
- Constant versus variable rate
- Polled sensor data
- Compressed voice stream
- Common message transfer techniques
- Packet switching
- Circuit switching
- Wormhole routing
8Wormhole Routing
- Is a way of pipelining packet transmission in a
mulithop network - Each packet is broken into a train of flits each
about one or two bytes long. - The sender transmits one flit per unit time and
- The flits are forwarded from node to node until
they reach their destination. - Over time, a train of flits in contiguous
(Adjacent), forms and makes its way to its
destination.
9Example
- The network is a 3-dimensional hypercube
- A message is to be sent from node 000 to node 111
- Node 000 breaks up its packet into flits, and
send them to node 001 at rate of one flit per
cycle - Node 001 forwards the flits it receives to node
011, which forwards to 111 - If the packet consists of six flits, the activity
is as follows
10Wormhole Routing (cont.)
- Hypercube 3 dimensional
- N-dimensional ? 2n nodes
- An n-dimensional hypercube is formed by taking
two (n-1) dimensional hyper cubes and connecting
like nodes
11Wormhole Routing (cont.)
12(No Transcript)
13Protocols Overview
14Real-Time CommunicationProtocols
- Contention-Based
- Each node listens until network is idle
- Nodes transmit only idle network detected
- Collisions occur when multiple nodes transmit at
the same time - Stop, random pause, retransmit
15Real-Time CommunicationProtocols
- Ethernet (CSMA/CD)
- All the nodes can monitor the communication
channel - When a node wants to transmit, if it observes the
channel is busy, it will refrain from interfering
with the ongoing transmission. - When it senses the channel is idle it will make
an attempt to transmit, thus there may be
concurrent transmission - Upon collisions, they will abort and retransmit
- Difficult to guarantee determinism
16Virtual Time Carrier Sensed Multiple Access
(VTCSMA)
- Single channel broadcast networks
- Bus Ring topology
- In CSMA there is no detection of priorities
- However, simply using the state of the channel,
the priorities is not enough, the time
information must also be considered. - The key to VTCSMA algorithm is that the priority
can be computed as a function of the current time
and some other parameter.
17Virtual Time Carrier Sensed Multiple Access
(VTCSMA) cont.
- The algo. Uses 2 clocks at each node
- One is the real-clock (RC) which tells the
real-time and is synchronized with the clocks
at the other nodes. - The 2nd is the virtual clock (VC) which behaves
as follows - When the channel is busy, the VC freezes, when
the channel becomes free, the VC is reset
(according to a formula) and then runs at rate n
gt1. That is the VC runs faster than the RC when
the channel is free, and not when it is busy.
18Virtual Time Carrier Sensed Multiple Access
(VTCSMA) cont.
- Since the real clocks are assumed to be
synchronized and the virtual times are regularly
reset with respect to the real-times, the virtual
times told at the various nodes are the same,
plus or minus some small skew. - This is used as the global priority of packets
transmitted - Each node computes a virtual time to start
transmission VSX(M) for every packet M awaiting
transmission at that node. - When the virtual time is greater than or equal to
VSX(M), packet M becomes eligible for
transmission.
19Real-Time CommunicationProtocols
- Contention-Based
- Work well only when collisions are low
- Sporadic traffic
- High loads can slow contention-based protocols
down to a standstill - Old parts of Engineering building network
- Token-Based
- Only the node that has a token can transmit
- (Same as the conch shell in Lord of the Flies)
- Token is passed from node to node
- Can easily be used as a deterministic protocol
20Real-Time CommunicationProtocols
- Token-Based
- Delays and overhead
- Propagation delay and message latency
- Messages are generally passed point-to-point
- Contention-based protocols are generally
broadcast - Token transfer time
- Time required to pass token from one node to
another (no transmission can occur during this
time)
21Real-Time CommunicationFault-Tolerance
- Token-Based
- Problems
- Loss of token
- Disconnection of a single node
- Options
- Timeout for lost token detection
- Contention-Based
- Problems
- Traffic flooding / denial-of-service
- Options
- Segment isolation (switches / routers / filtering)
22Real-Time CommunicationFault-Tolerance
- Routing
- Messages can be sent over multiple independent
routes - Too many duplicates can flood networks
- Too few duplicates may not provide adequate
fault-tolerance
23Real-Time CommunicationIndustrial Issues
- Low-level communication
- Mechanical -gt Pneumatic -gt 4-20mA
- Medium-level Communication
- Physical Medium
- Twisted pair (differential)
- Coaxial
- Fibre-Optics
- Protocols
- Traditional use of deterministic semi-proprietary
interfaces between devices and controllers (PLCs) - DeviceNet (CSMA-based), Profibus (token-based),
CANOpen, Fieldbus (lower-level)
24Real-Time CommunicationIndustrial Issues
- High-Level Communication
- Increased demand for information and transparency
to plant floor information - Use of common general purpose protocols between
devices/PLCs and HMI/SCADA systems - Ethernet (and TCP/IP over Ethernet)
- More durable physical connectors (RJ-45 is
flimsy) - Topologies supporting redundancy
- Full-duplex switched networks to improve
determinism - Interoperability / low-cost / high bandwidth
25Real-Time CommunicationWireless Issues (Digital)
- Code Division Multiplex Access (CDMA)
- Spread-Spectrum
- Tolerant to interference
- Contention-Based
- Time Division Multiple Access (TDMA)
- Similar to Token-Based Protocols
- Dedicated time slots for each user