Professional Documents
Culture Documents
1
Contents
• Introduction
• Media communication
• Network Topology
• Sending message
• Network Design Issues
• Protocol
• Summary
2
Introduction
3
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 Silenc
e
• “Talkspurts”
SAK5308 - Real Time Systems - Real-Time Communication 4
Real time system
structure
Peripheral cluster
central cluster
5
Introduction
6
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
7
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).
8
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.
9
Communication
media
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.
10
Communication
media
• Point-to-point network …
– No tap
– Interface have optical ->
electrical and electrical -> Node
optical. Network interface
– Interface change optical
signal to electrical and vice
versa.
Optical to Electrical to
– Node will check whether the electrical optical
receiving message is for
itself or not. electronics
interface
node
Point-to-point network
11
Communication
media
• Passive star
– Interface will send optical
signal to glass cylinder
(passive star).
– Output will be divided
between output fiber frin
Interface 1 Interface 2 Interface 3
sylinder.
– Interface receive input and
choose intended message for
itself. Passive
– Need sensitive and powerful star
transceiver to detect signal.
Star architecture
12
Communication
media
• WDM (wavelength division
multiplexing)
– Divide fiber channel into virtual
channel.
Interface 1
– Every channel has interface and
optical detector to change Interface 2
wavelength in virtual channel. Interface 3
– Every channel has enough Interface 4
bandwidth to suite with electronic
interface bandwidth. Interface 5
13
Communication
Media
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.
14
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.
15
Network
Topology
• 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.
16
Network
Topology
Network path
interface interface
Node 1 Node n
Shared network
Point-to-point network
17
Network
Topology
• 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.
19
Network
Topology
5. Multistage network
•Built out of switchboxes
•4 confguration.
4 configuration 2 X 2 switch
20
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
21
Sending Message
Circuit switching
22
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.
23
Network Design
Issues
• 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.
24
Network Design
Issues
• 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.
25
Network Design
Issues
• 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.
I/O 3 4
controller
0 1 node
0 1 2
26
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
27
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??
28
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.
29
Protokol :
VTCSMA
Operation of virtual clock
t4
t3
VC Channel busy
t2 Channel idle
t1
t1 t2 t3 t4
RC
30
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.
31
Protokol : Token
Based Protocol
32
Protokol : Token
Based Protocol
– Token algorithm :
• Medium propagation delay
• Token transmission time
• Token capture delay
• Network interface latency
33
Protokol : Time
Token Protocol
• Timed token protocol
1. 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.
34
Protokol : Token
Ring
Error control
SD AC ED DA SA message ED FS
code
IEEE 802.5 token ring
SD –start delimiter
AC – access control
ED – ending delimiter
FS – Frame status
SA – Source address
DA – Destination address
Disemak oleh
FS = 00 -> destination node not available sender bila
FS =10 -> frame tidak boleh disalin ke destinasi data frame kembali
FS =11 -> frame diterima oleh destinasi semula. After that,
remove the FS
35
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.
36
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.
37
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.
38
Example:Round
Robin
Execute using FIFO
Assume : 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
0 10 20 23 30 40 50 52 61
Waiting time;
P1 = 0ms
P2 = (10 + (40 - 20) + (52-50)) = 32ms
P3 = 20ms
P4 = 23ms
P5 = (30 + (50-40)) = 40ms
Average waiting time = (0 + 32 + 20 + 23 + 40) / 5 = 23ms
39
Protocol :
Deadline Based
Protocol
• Deadline based protocol
– Preemptive vs nonpreemptive
– 3 types of traffic
1. Guaranteed traffic
System ensure that every packet must meet its deadline.
2. Statistical real time traffic
Packet cannot miss deadline exceeding certain
percentage that be in agreement
3. Non real-time traffic
Packet did not guarantee/meet deadline (deadline is not
important)
40
Protocol
Protocol for real time system
• 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
• Routing
– Messages can be sent over multiple
independent routes
• Too many duplicates can flood networks
• Too few duplicates may not provide adequate
fault-tolerance