Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Determinism
Composability
Flexibility
Fault Tolerance
Real-time Embedded Systems- Lecture 06
The sender and the receiver , each has a client associated with it.
The sender sends a message and awaits an acknowledgement from the receiver after starting
a timeout counter and a retry counter.
If the acknowledgement is received within the timeout value, it informs its client and the send
task is assumed to have been complete. Else, it checks if the maximum number of retry attempts
have been exceeded or not and attempts another send. A failure is intimated to the client once
the max. number of retries is exceeded.
The receiver , on receiving a message, first checks if the message has already been received or
not. If it has been received, it sends an acknowledgement to the sender only. Otherwise, it sends
the message to its client and sends an acknowledgement to the sender.
The receiver is programmed to receive messages from the sender at some pre-designated
instants only.
No explicit acknowledgment is sent.
Reliability is ensured by sending the message through multiple links.
Device Net
Protocol Implementations
Manchester Coding:
0 1
0 is encoded by a transition from Hi to Lo
1 is encoded by a transition from Lo to Hi
Send a 0 as Lo
Send a 1 as Hi
END END
1 1 0 1 000 1
SYNC SYNC
Real-time Embedded Systems- Lecture 06
Media Access
Polling: Master polls the slave nodes which send messages when polled.
Slaves communicate amongst one another through the master
TDMA: Master synchronizes the clocks of all slaves. Each node transmits
during a pre-designated time slot.
1 2 3 4 5
time slots
Master Node 1 Node 2 Node 3 Node 4
Real-time Embedded Systems- Lecture 06
Explicit Token Passing: A token or a signal is passed from node to node across the
network (forming a virtual ring). Only the owner (token holder)
can transmit at any given instant.
Tokens are piggy-backed on data bearing messages.
Message prioritization is possible. A token could be a number
indicating which node should transmit next.
Recovery mechanism has to be devised- node bearing the token
goes down.
2 3
CSMA/CA
Real-time Embedded Systems- Lecture 06
•This is a system where each computer listens to the cable before sending anything through
•the network.
•A collision occurs when two modes try to transmit at the same instant.
•Each computer then backs off and waits a random amount of time before attempting
• to retransmit, when a collision occurs.
Binary Countdown
•Each node willing to transmit a signal send a string of bits representing the binary value of its
identification number.
•A node drops out of competition if it detects a dominant state while trying to transmit a
recessive state
Real-time Embedded Systems- Lecture 06
Lets say that nodes 4 and 5 start competing for the network at the same instant. This
is
what happens:
Messages in a node are transmitted according to a local priority (highest priority message in
a node xmitted first) or a global priority (across all nodes). The global priority of a message
may be a function of the node’s inherent priority.
•Latency
•Efficiency
Real-time Embedded Systems- Lecture 06
Message Latency
It is the time interval from the instant the message is enqueued for transmission to the instant
the last bit is received. The message has to be enqueued before the arbitration slot i.e. before
the node starts transmitting.
Efficiency
Message Efficiency: How many messages are actually useful at protocol level?
Bit-wise Efficiency: (Total number of useful data bits including portions of header
used for identifying )/(Total nos. bits transmitted)
Q. Which of the two protocols viz. token passing and CAN has a higher message
efficiency?
Application
SOF
11 BIT IDENTIFIER IFS
Application Layer Host Controller
RTR
IDE
r0
Data Link CAN Controller
DLC
ACK
CAN Bus Indicates priority.
Lower value, higher priority
EOF
Twisted pair with differential drivers &
120 ohm terminators
Uses NRZ coding with bit stuffing
Real-time Embedded Systems- Lecture 06
Media access: Uses NRZ coding and binary countdown (bit dominance)
Uses bit stuffing for long messages ( an opposite stuff bit
every 5 identical bits)
Q. How does the bit string 1111 1111 0000 0000 get coded with
stuff bits?