+ All Categories
Home > Documents > 3679.Rts_chapter 6 Ppt

3679.Rts_chapter 6 Ppt

Date post: 26-Mar-2015
Category:
Upload: shivani-raheja
View: 898 times
Download: 1 times
Share this document with a friend
54
1 Chapter 6 REAL TIME SYSTEM COMMUNICATION
Transcript
Page 1: 3679.Rts_chapter 6 Ppt

1

Chapter 6REAL TIME SYSTEM COMMUNICATION

Page 2: 3679.Rts_chapter 6 Ppt

2

Contents

• Introduction• Media communication• Network Topology• Sending message• Network Design Issues• Protocol • Summary

Page 3: 3679.Rts_chapter 6 Ppt

3

Introduction

• Effective communication between various hardware in real time system are crucial to ensure it can function correctly.

• Embedded system– Data flow:

• From sensor and control panel to central cluster of processor.

• Between processors in the central cluster.• From processor to the actuators and output display.

– Communication overheads adds to the computer response time.

Page 4: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 4

Real-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

Page 5: 3679.Rts_chapter 6 Ppt

5

Sensor and actuator layer

Peripheral cluster

central cluster

Real time system structure

Page 6: 3679.Rts_chapter 6 Ppt

6

Introduction

• Hard Real time system – use communication protocol so that communication overhead can be enclosed .

• Soft real time system – Multimedia and video conferencing– Delay in data transmission can effect quality of service but

it is not critical.• Protocol communication real time system vs traditional system.

– Real Time System – able to transmit message on time (follw the deadline)

– Traditional System – able to transmit lots of data from source to destination through network in one time. (throughput).

Page 7: 3679.Rts_chapter 6 Ppt

7

Introduction

• Delay in message can cause by:– Format and message packet– Line of message when waiting to access the communication

media.– Sending message form source to destination. – Deformatting the message.

• Real time traffic is categorized based on:– Deadline– Arrival pattern– Priority

Page 8: 3679.Rts_chapter 6 Ppt

8

Introduction

• Real time traffic resources have two categories:– Constant rate

• The size of fix packet is produced in equal time rate.• easy to manage.

– Variable rate• The size of fix packet is produced in unequal time rate

or• Various packet size can be produced in fix time rate.• example : voice can have talk spurts ( a lot of packet

followed by silent).

Page 9: 3679.Rts_chapter 6 Ppt

9

Communication media

• 3 important media:– Electromagnetic medium– Fiber optic– Wireless

a. Electromagnetic Medium– Twisted pair and coaxial cable– Twisted pair – connected using RJ45/RJ11 depends on cable

category.– Coaxial cable – hardware is connected using T-junction or

vampire tap.

Page 10: 3679.Rts_chapter 6 Ppt

10

b. Fiber optic– Transform electric signal to light impulse. – Operates up to 10Gbps ( NOW ???)– Receiver will change the signal back to electric signal. – Point-to-point network and passive star – suitable to use fiber

optic.– Advantages

• High Bandwidth• No electromagnetic interference.

– Disadvantages• Difficult to add node without losing any signal. • High maintenance cost.

Communication media

Page 11: 3679.Rts_chapter 6 Ppt

11

• Point-to-point network– No tap– Interface have optical ->

electrical and electrical -> optical.

– Interface change optical signal to electrical and vice versa.

– Node will check whether the receiving message is for itself or not.

NodeNetwork interface

Optical to electrical

Electrical to optical

electronics

interface

node

Point-to-point network

Communication media

Page 12: 3679.Rts_chapter 6 Ppt

12

• Passive star– Interface will send optical

signal to glass cylinder (passive star).

– Output will be divided between output fiber frin sylinder.

– Interface receive input and choose intended message for itself.

– Need sensitive and powerful transceiver to detect signal.

Interface 1 Interface 2 Interface 3

Passive star

Star architecture

Communication media

Page 13: 3679.Rts_chapter 6 Ppt

13

• WDM (wavelength division multiplexing)– Divide fiber channel into virtual

channel.– Every channel has interface and

optical detector to change wavelength in virtual channel.

– Every channel has enough bandwidth to suite with electronic interface bandwidth.

Interface 1

Interface 2

Interface 3

Interface 4

Interface 5

Communication media

Page 14: 3679.Rts_chapter 6 Ppt

14

c. Wireless– Distance between radio and transmitter, while sustain the

receiver depends on:• Transmitter power• Receiver sensitivity• Noise level• Type of error control.• Attenuation barrier (walls, partitions, hardware etc)

– Advantages • No need wires to connect node. • Develop Ad hoc network.

– Disadvantages • Interference.

Communication Media

Page 15: 3679.Rts_chapter 6 Ppt

15

Network Topology

• To develop and design network, important criterias that should been taken are:– Diameter – maximum length between two nodes in the

system. – Node degree – quantity of peripheral that located adjacent

to node, shows total of I/O port for each node and total of channel in the system.

• Many hardware – higher cost– Fault-tolerance – measure network ability to handle

individual channel failure and node failure while operating.

Page 16: 3679.Rts_chapter 6 Ppt

16

• Network topology clasification:

1. Point-to-point topology

2. Shared topology (broadcast)

1. Point to point• Node is connected using dedicated link• If node send messages not to an adjacent node, that

message will pass through intermediate node (router, bridge).

2. Shared topology• All node can use the communication channel but only

one node can send message at one time.

Network Topology

Page 17: 3679.Rts_chapter 6 Ppt

17

interface interface

Node 1 Node n

Node 4

Node 2

Node 3

Node 1

interface interface

interfaceinterface

Network path

Shared network

Point-to-point network

Network Topology

Page 18: 3679.Rts_chapter 6 Ppt

18

• Types of network topology:

1. Bus• Both end will be terminated to prevent electromagnetic

interference.• Interface consists of tap or forwarding points

2. Ring• Receive bit will be copy into buffer, process and then send to

output.

Topologi Bas Topologi Cincin

Network Topology

Page 19: 3679.Rts_chapter 6 Ppt

19

3. Mesh

4. Hypercube– 2n node in n-dimensional hypercube– Node is label binari 0 to 2n – 1 and is

connected using line between node with differentiation one bit.

– N-dimensional = two (n-1)-dimensional hypercubes

Rectangular mesh

10

00 01

11

Hypercube network : two-dimensional

Network Topology

Page 20: 3679.Rts_chapter 6 Ppt

20

4 configuration 2 X 2 switch

Physical Topology vs Virtual Topology???

5. Multistage network•Built out of switchboxes•4 confguration.

Network Topology

Page 21: 3679.Rts_chapter 6 Ppt

21

Sending Message

• 3 methods to send message:

1. Packet switching• Message will be break apart into packet. • Packet has header that contain source address, destination and

other important information.• Sending to destination using routing and flow control algoritma.

2. Circuit switching• Circuit will establish between source and destination before

sending message. • Other message must wait until the sending process complete.

3. Wormhole routing• Pipelining sending packet in multihop network.• Can cause deadlock

Page 22: 3679.Rts_chapter 6 Ppt

22

S

D

Circuit switching

Sending Message

Page 23: 3679.Rts_chapter 6 Ppt

23

Network Design Issues

• High level design/architecture– High level distributed system contains set of node that

communicate through network.– Every node can be a multiprocessor that have application,

system and network processor.– Network architecture can support scalability, easy to run, reliable

and support communication 1 to 1 and 1 to many.• Low level design/architecture

– Provide packet processing , routing and error control. – In real time distributed system, there are deadline, time

management and housekeeping issues. – Network processor (NP) – function to handle those issues.

Page 24: 3679.Rts_chapter 6 Ppt

24

• Network Processor (NP)– Execute sending message from source to destination

operation.– Task that send message will give information to NP about the

receiver and message destination– NP tasks

• Establish connection between source and destination• Handle error detection and resend message. • Choose alternative route. • Give bandwidth. • Packet the information to data block and segment.• Assemble packet when reach its destinantion.

Network Design Issues

Page 25: 3679.Rts_chapter 6 Ppt

25

• Continue…– In point-to-point: NP choose switching technique.– In token ring: NP choose suitable protocol to ensure it meets its

deadline.– NP perform framing, synchronization and packet sequencing.

Network Design Issues

Page 26: 3679.Rts_chapter 6 Ppt

26

• I/O Architecture– To enhance I/O, the I/O hardware will be divided to multiple

access path (multi accessibility) and handle by a controller.– Multi accessibility – combination of I/O hardware and then

assign a controller to manage access to hardware in each cluster.

– Controller is connected with three node in the system.

0 1

0

3

1

4

2

node

I/O controller

Network Design Issues

Page 27: 3679.Rts_chapter 6 Ppt

27

Protocol

• Protocol category– Contention-based protokol

• VTCSMA• Window protocol

– Token-based protocol• Timed token protocol• IEEE 802.5 Token ring protocol

– Stop-and-go Multihop Protocol– Polled bus protocol– Hierarchical round-robin protocol– Deadline based protokol– Fault tolerance routing

Page 28: 3679.Rts_chapter 6 Ppt

28

Protocol : VTCSMA

• VTCSMA (virtual time carrier sensed multiple access)– for single-channel broadcast network, ring and bus

topology– Node monitor channel and sending message if the

channel is idle.– If many nodes sending packet at one time, this can cause

collision.– If collision happen, the sending node will abort and try to

send again after the channel is idle.– CSMA-distributed algorithm, every node can determine

time to send message. How to determine??

Page 29: 3679.Rts_chapter 6 Ppt

29

Protocol : VTCSMA

• Information in each node:– Channel state ( idle or busy )– Priority packet wait in the buffer before sending through

network. – Time follows syncronized clock

• VTCSMA algorithm used two clock for each node:– Real clock (RC) – tells real time that synchronized with node’s

clock.– Virtual clock (VC)

• If channel is busy, VC freeze. • If channel free, VC reset at rate n>1. • VC is more accurate than RC when it is free.

Page 30: 3679.Rts_chapter 6 Ppt

30

Protokol : VTCSMA

t1

t4

t3

t2

t1 t2 t3 t4

RC

VC Channel busy

Channel idle

Operation of virtual clock

Page 31: 3679.Rts_chapter 6 Ppt

31

Protokol : Window Protocol

• Window protocol– Based on collision sensing.– Cannot guarantee message will be send on time. – Suitable for soft real time system.– System contain set of node which is connected through bus.– Every node will monitor bus line to receive message dedicated

for them.– Window– Node can send packet if latest-time-to-transmit (LTTT) packet

is located in the window and the channel is idle. – If so many sending packet, refer to LTTT value.

Page 32: 3679.Rts_chapter 6 Ppt

32

Protokol : Token Based Protocol

• Token based protocol– Token – Grant for node to send packet in the network.– When done, node will send the token to other node. – Suitable for bus and ring topology/

Page 33: 3679.Rts_chapter 6 Ppt

33

– Token algorithm :• Medium propagation delay• Token transmission time • Token capture delay • Network interface latency

Protokol : Token Based Protocol

Page 34: 3679.Rts_chapter 6 Ppt

34

Protokol : Time Token Protocol

• Timed token protocol1. Synchronous traffic

– real time traffic.- protokol ensure each node can send synchronous trafic for each T unit time.

2. Asynchronous traffic- non-real time traffic. - take unused bandwidth from synchronous traffic.- Key control – TTRT (target token-rotation time)- when token arrive, node will check the value

• Cycle time >TTRT = LATE , transmit synchronous traffic• Cycle time < TTRT = EARLY, transmit synchronous and

asynchronous traffic.

Page 35: 3679.Rts_chapter 6 Ppt

35

Protokol : Token Ring

IEEE 802.5 token ring

SD SAAC DAED ED FSmessageError control

code

SD –start delimiterAC – access controlED – ending delimiterFS – Frame statusSA – Source addressDA – Destination address

FS = 00 -> destination node not availableFS =10 -> frame tidak boleh disalin ke destinasiFS =11 -> frame diterima oleh destinasi

Disemak oleh sender bila data frame kembali semula. After that, remove the FS

Page 36: 3679.Rts_chapter 6 Ppt

36

Protokol

• Packet Scheduling– Cannot preempted packet transmission. If occur, the sender

must resend the packet. – Overhead occur while sending the message again. – Decide priority for each packet earlier.

Page 37: 3679.Rts_chapter 6 Ppt

37

Protocol : Stop and Go Multihop

Protocol• Stop and go multihop protocol

– For hard deadline packet delivery– Distributed algorithm– Every node works without any control. – All nodes can send and served in nonpreemptive priority order.– Node idle when there is no packet to be send.

Page 38: 3679.Rts_chapter 6 Ppt

38

Protocol : Polled Bus Protocol

• Polled bus protocol– Assume bus network with a bus busy line.– When processor broadcast on the bus, it maintains this high

line.– When finish, this line is reset.– Line execute wired-OR operation.– When 2 signal, A and B put on a line simultaneously, the signal

is A.OR.B.

Page 39: 3679.Rts_chapter 6 Ppt

39

Execute using FIFOAssume : 5 processes P1, P2, P3, P4 and P5 with execution time are 10, 29, 3, 7 and 12 (unit ms)Assume start time, t = 0 ms and quantum time = 10ms

P1 P2 P3 P4 P5 P2 P5 P2

Waiting time;P1 = 0msP2 = (10 + (40 - 20) + (52-50)) = 32msP3 = 20msP4 = 23msP5 = (30 + (50-40)) = 40msAverage waiting time = (0 + 32 + 20 + 23 + 40) / 5 = 23ms

0 10 20 23 30 40 50 52 61

Example:Round Robin

Page 40: 3679.Rts_chapter 6 Ppt

40

Protocol : Deadline Based Protocol

• Deadline based protocol– Preemptive vs nonpreemptive– 3 types of traffic

1. Guaranteed trafficSystem ensure that every packet must meet its deadline.

2. Statistical real time trafficPacket cannot miss deadline exceeding certain percentage that be in agreement

3. Non real-time trafficPacket did not guarantee/meet deadline (deadline is not important)

Page 41: 3679.Rts_chapter 6 Ppt

41

Protocol

Protocol for real time system

Protocol Deadline guarantee Type of network

VTCSMA No Broadcast

Window No Broadcast

Timed token Yes Ring

IEEE 802.5 Yes Ring

Stop-and-go Yes Point-to-point

Polled bus No Bus

Hierarchical round robin

Yes Point-to-point

Deadline based No Point-to-point

Page 42: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 42

Wormhole 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.

Page 43: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 43

Example

• 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

Page 44: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 44

Wormhole 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

Page 45: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 45

Wormhole Routing (cont.)

010 011 110 111

000 001 100 101

Page 46: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 46

Real-Time Communication

Protocols• 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

Page 47: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 47

Real-Time Communication

Protocols– 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

Page 48: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 48

Virtual 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.

Page 49: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 49

Virtual 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 >1. That is the VC runs faster than the RC when the channel is free, and not when it is busy.

Page 50: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 50

Virtual 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.

Page 51: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 51

Real-Time Communication

Protocols• 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

Page 52: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 52

Real-Time Communication

Protocols• 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)

Page 53: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 53

Real-Time Communication

• 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)

Page 54: 3679.Rts_chapter 6 Ppt

SAK5308 - Real Time Systems - Real-Time Communication 54

Real-Time Communication

• Routing– Messages can be sent over multiple

independent routes• Too many duplicates can flood networks• Too few duplicates may not provide adequate

fault-tolerance

Fault-Tolerance


Recommended