MSc in Industrial Computing Systems Computer Communications Lecture 4. - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

MSc in Industrial Computing Systems Computer Communications Lecture 4.

Description:

Need flexibility of switching polling data according to hours of day. Roll-Call polling is ideal. ... the term Roll Call Polling and discuss its method of ... – PowerPoint PPT presentation

Number of Views:332
Avg rating:3.0/5.0
Slides: 30
Provided by: Miko80
Category:

less

Transcript and Presenter's Notes

Title: MSc in Industrial Computing Systems Computer Communications Lecture 4.


1
MSc in Industrial Computing SystemsComputer
CommunicationsLecture 4.
  • Lecturer Dr. David Al-Dabass
  • Room N315
  • Tel. 6015
  • email david.al-dabass_at_doc.ntu.ac.uk

2
Section 4. Message Based Communications
More intelligent terminals, e.g. bank data-entry
terminals and department store point-of-sale
terminals can handle a whole message (or
block).- Multi-drop linesmake optimum use of
the medium (wire) by having several terminals
share the same pair of wires.all terminals
communicate with the same central computer, using
the same line.
C
a) each terminal uses a terminator to connect it
to the same line (or modem if PSTN is used).b)
controller at the centre imposes a discipline
to avoid clash or collision the discipline is
called POLLING REGIME.c) two types of polling
regime in use - Hub polling - Roll Call
polling
3
d) Messages from computer are sent out when the
channel is free messages from terminals are
polled by the controller i.e. - ask terminal
if it has a message to send to computer, if it
does then allocate a time slot to receive the
message.e) The message itself may be received
on a separate i/o channel from that used for
polling. f) All terminals receive every
message message has terminal address to identify
the terminal.g) Buffer in terminal holds a
complete message, e.g. one whole line before
sending to computer when polling controller
allows it. Similarly a buffer in the central
computer holds a complete message ready to send
to the terminal.h) As a whole string of
characters (message) is to be sent, Synchronous
transmission/character-framing is used.
4
Roll-Call Polling (RCP)
a) Controller keeps a list (roll) of terminal
addresses it sends a Poll Message
Reply from terminal is either
OR Negative Acknowledgement - no data in
terminal buffer.
NACK
OR if no reply within set time, terminal must be
switched off.
b) User presses send button, data is stored in
output buffer and terminal waits for Poll message
to transmit data to computer.c) Computer polls
next terminal in the roll and so on.d) Busy
terminals have their addresses appear more than
once in the roll. Roll can be changed by the
operator.
5
Hub-Call Polling
a) A polling channel is connected between
terminals in a round-robin or daisy chain
fashion.
b) First Terminal receives polling message from
computer. At the end of its message transmission,
the terminal sends a polling message to the next
terminal and so on.c) Controller takes over
after4 last terminal.Which Polling Regime do we
use?It depends on many factors.
6
Factors to considera) Response Roll-Call
Polling is more flexible, I.e. operator can
adjust controller poll list to change individual
terminal responses. For fast terminals put their
addresses several time in the roll. b)
Efficiency Hub controller does less work as
terminals pass the poll message around
themselves. Controller concentrates on
sending/receiving data. c) Flexibility RCP is
easily re-programmed for failed terminals H-P
upsets all terminals if one fails. Failed
terminals must be by-passed by unlinking/linking
cables. d) Hardware For the same number of
terminals RCP need more work from controller and
higher bandwidth to cope with more demanding data
rates. H-P terminals need more logic to pass poll
message and an extra line (in the buffer) to pass
these messages.SUMMARY Compromise
between 1. Message size 2. Desired
response 3. Flexibility for any given cost.
7
APPLICATIONS
Main weakness of multi-drop terminal
networks Keyboard input is stored locally and
only received by computer when asked for (by
computer).This is considered not suitable for
general purpose interactive computing - response
is not fast enough.However ideal when large
amount of data are entered and either - no
response is expected, or - delayed response is
acceptable.EXAMPLES - point of sale
systems. - transaction processing. Invoice
details are entered name, address, numbers
quantities. Operator presses send key, then
next poll from computer takes the data in.
8
- Airline booking system. Input flight
details, flight number, destination time,
etc. Output cost and availablity. Response
15 seconds. Terminals in 2 types of
locations Airline Offices, or Travel Agent
Offices Flexibility during work hours 9-12
2-5, more data comes from airline offices
(processing bookings received by post etc.), less
data from travel agents, as public are at
work. ? Airline Office terminals must be
polled more frequently Travel Agents
terminals less so. Outside work hours
lunch time, after 5 p.m., Saturdays complete
opposite more data from travel agents and
less from airline offices. ? Need flexibility
of switching polling data according to hours of
day. Roll-Call polling is ideal.
9
Questions
1. Define the phrase Message-Based Network and
compare it with character-based networks.2.
What is multi-drop line? What is the motivation
for using such system?3. What is a Polling
Regime? Identify the two most common techniques
used.4. Explain why synchronous character
framing is used with polling.5. Define the term
Roll Call Polling and discuss its method of
application. Refer to the terminal address, ACK
and NAK in your answer.6. How does RCP deal
with busy terminals?7. What is Hub Polling?
Explain its principal of operation and refer to
Polling, Input and Output channels in your
answer.8. Compare and contrast Roll Call
Polling (RCP) and Hub Polling (HP).9. List 3
application areas where polling is used and
describe one in detail.
10
A SIMPLE MESSAGE PROTOCOL
Binary Synchronous Communications (BSC)
Control characters
End of Text, or End of Text in this Block (more
to follow)
Block Character Check - calculated by the sender
on all the characters in the message receiver
uses the same algorithm to calculate its own
version of BCC and checks it with the received
BCC.
Start of Header
Start of Text
Sequence of Operations1. Establish
connection sender must know that receiver is
ready.2. Accurate Data Transfer no errors or
loss of data.3. End receiver must be told
that there are no more data to come.
11
Typical Sequence of Messages
1. Establish connection a) sender enquires to
see if receiver is ready, message is sent ENQ in
the text field. b) receiver acknowledges to say
go ahead, message is sent back with ACK0 in the
text filed.2. Data Transmission a) sender
sends data in block, message is sent with DATA in
text field. b) receiver calculates BCC (Block
Character Check) as characters come in, then
compares with bits received in the BCC field
if checksum is OK store the received data and
send back message with ACK in the text field
if checksum is not OK send negative
acknowledgement message with NAK in text
field. c) when sender receives ACK it sends
another block of data if it receives NAK it
re-sends last block waits for ACK.3.
End a) sender sends end of transmission
character, message with EOT in the text field.
12
Notes a) if a receiver is too busy to deal with
a message it simply ignores it. Sender waits for
a predetermined time-out period to receive
ACK or NAK, if it does not receive either it
resends the last block. b) this process is
repeated a predetermined number of times before
sender gives-up -gt Abort transmission condition
is raised. c) this way there is only one
outstanding message/block at any one time. d)
data is flowing in one direction only at a time.
13
Two Major Characteristics of Computer
Communications1. Handshake Computer
A Computer B
ENQ
ACK0
DATA
ACK or NAK

EOT
Back and forth transfer of messages to tell both
parties engaged in the communication that
previous transfer is i. OK, or ii. Not OK,
or iii. no Reply
14
Network Layers
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Link Layer
Physical Layer
Structure of the ISO reference model.(For more
information see Halsall or Comer)
15
Questions
1. Explain the following terms BSC, SOH, STX,
ETX, ETB, BCC, ENQ, ACK0, ACK, NAK and EOT. What
are these terms called collectively?2. What is
the difference between ETX and ETB?3. What are
the 3 phases of a communication sequence? How is
connection established?4. Explain how control
characters are used in typical message based
protocol?5. How does the receiver check the
character sequence just received is error
free?6. What is the difference between ACK0 and
ACK?7. What does the sender do when it receives
a NAK from the receiver?8. Comment on the terms
time-out, abort and their control
characters.9. Handshake and layered structure
are the two major characteristics of computer
communications. Elaborate on this issue.
16
Error Control
Nature of ErrorsErrors in computer
communication systems mainly occur in the
transmission media.Causes of Errors noise due
to electro-magnetic interference from equipment
nearby e.g. clicking noise on telephone lines
due to electrical noise from relays
motors.Effect of noise depends on the power of
noise relative to power of signal.Only when the
noise power is comparable to the signal power
(i.e. when noise power gt certain threshold) does
data become corrupted. Noise power varies,
therefore data corruption is intermittent and
unpredictable. A burst of noise corrupts a data
bit sequence causing ERROR BURST.When human
(biological life system/entity) hears
noise-corrupted sound (speech/language fragment)
he/she can still understand it because a)
there is redundancy information in language (e.g.
grammar, sentence structure etc.) b) He/She has
an active model of the idea of the conversation
in the head which can predict and extrapolate the
next piece of information.
17
HOW CAN WE MAKE COMPUTER COMMUNICATIONS MORE
RELIABLE?
We can split this question into twoa) How can
a receiver know if there are errors in the
received datab) What can it do to correct the
errors and get the uncorrupted data?Note
impossibility of 100 certainty in accuracy of
received data to be 100 sure of accuracy,
receiver must know the original data in which
case there is no need to transmit!!Also even
if same data is received after 2 transmissions,
it is still possible that the same error has
occurred twice.TRADE-OFF between RELIABILITY
and EFFICIENCY in data communications.E.g. to
get high reliability send data twice, but this
means efficiency is low.
18
ERROR CONTROL
Echo checking receiver echoes data back to
sender for checkingi) redundancy data is
transmitted twice.ii) Needs (implies the
existence of) a TWO way communication
medium.iii) Used in Asynchronous
terminal/keyboard-computer communication with the
user checking echoed characters on the vdu.iv)
Works well with Asynchronous mode because -
human (intelligent) operator checks echo. -
computer doesnt need to do any work, apart from
send character back. - there is plenty of spare
channel capacity to send characters back human
speed ltlt channel capacity.
FORWARD ERROR DETECTION
To avoid re-sending every character back to
sender for checking, how about sender sending
extra info in the data to help receiver discover
errors and correct them?Sender needs to add
extra check bits to data so that receiver
cani) Detect that error has occurredii)
Which bit has changediii) Correct the errors by
inverting the faulty bits.
19
HAMMING CODE
For every 4 data bits, 3 check bits are added as
follows
Each data bit is covered by the check bits
according to the rule sum of check bits
data bit positioni.e.
Table 1
Re-arranging table to give check bits in terms of
data bits
Table 2
20
Sender uses Table 2 to work out C bits add them
to data bits before sending.Example D1 0 D2
1 D3 1 D4 0From Table 2
?Hamming Code is
Example Receiver drops bit 5
Calculate C bits from D bits (See Table 2)
Calculated Received
Therefore EITHER C1 C3 were not received
correctly, OR some data bits used in calculating
C1 C3 not received correctly.
21
A table has been derived to relate the incorrect
check bits to the error-bit position
Table 3
Note Hamming code is designed to correct one
bit only. If more than one bit is wrong, it can
not be used reliably. However, the data can be
arranged before sending re-arranged after
receiving before using table 2 to calculate the
check bits at the receiver table 3 to correct
errors.Efficiency needs 7 bit to send 4 data
bits, i.e. Efficiency 4/7 57and that
only corrects one bit error.
22
Features of Forward Error Codes (FEC)
1. Only need a simplex connection. Echo and
Auto-repeat-request need 2-way or ½ duplex at
least2. Faster than echo auto-repeat-request
for long distances, e.g. satellite base
communication.3. More complex codes are
available for more than one bit check/correct,
particularly when noise characteristics are
known, i.e. noise power spectrum (power of each
frequency band) and amplitude distribution
(probability of occurrence of each amplitude band)
23
Questions
1. What causes errors in computer
communications?2. How can computer
communications be made more reliable? How does
reliability affect efficiency?3. What is echo
checking? Explain whether it can be applied to
computer-computer communications.4. How does
forward error correction differ from echo
checking? Compare contrast.5. What does the
Hamming code do to 4 bit before transmission?6.
What does the receiver do with the 7 bit code?
Work out the 7 bit code for all 16 combinations
of a 4 bit data.7. Discuss the limitations and
efficiency of the Hamming code and outline the
essential features of the Forward Error
Correction technique.8. Explain the terms power
spectrum and amplitude distribution within the
context of Forward Error Correction (FEC) codes.
24
AUTOMATIC REPEAT REQUEST
Sender works on data and produces check bits
(fixed length), check bits are sent out after
data.Receiver works on received data in
exactly the same way as sender and produces its
own version of check bits. Compare calculated
with received if same OK else ask sender to
repeat message Difference between Message and
Block (or Packet)Message is complete unit of
users data, i.e. logical entity.Block is a
physical unit comprising user data, check
bits, other characters.Check bit generation
Polynomial Code Checking.Sender uses an
internationally agreed generating
polynomial 216 212 25 1to determine the
check bits. The resulting number (data and check
bits) is exactly divisible by the generating
polynomial 216 212 25 1, i.e. leaving zero
remainder. This fact is used by the receiver to
check the validity of the received message.
25
Receiver 1. Divide the received message by the
generating polynomial 216 212 25 12.
If the result is zero, assume no errors have
occurred.3. Else ask for repeat.Generating
Circuit for the polynomial 216 212 25 1
To produce check bit Switches A B closed and C
open.To clock check bits out (after data) A
B open and C closed.
26
METHODS OF BLOCK TRANSMISSION a) Idle Repeat
Request (Idle RQ)Method sender waits after
transmitting a block for ACK or NAK before
sending next block. Retransmit after time-out,
abort after a number of time-outs.There is
wasted idle time between sending the last bit
of a block and sending the 1st bit of the next
block.
27
b) Continuous Repeat ReQuest (Continuous
RQ)Method i) sender sends block n 1
immediately after block n without waiting for ACK
or NAK.ii) sender gives each block a unique
sequence number receiver uses same sequence
number to identify block being ACKed or
NAKed.Two processes S (send block) and R
(receive ACK or NAK) work concurrently at the
sender.
Dealing with Errors when sender receives a NAK
for a particular block number, it re-sends it in
either one of 2 waysi) Go-Back-N (GBN) blocks
i.e. re-send all blocks starting with the NAKed
one.
28
ii) Selective retransmission
S
..
R
Time
i.e. only re-send the block that was
NAKed.Comparison between the Go-Back-N and
Selective Retransmission1. GBN wastes channel
capacity by re-transmitting blocks possibly
unnecessarily waste depends on error rate.2.
Selective re-transmission needs large storage
area at receiver end while receiver waits for
re-transmission to buffer the data blocks
received out of sequence. Extra storage space
depends on error rate and delay. i.e. trade-off
between channel capacity and receiver storage
hardware.As receiver storage is limited most
protocols use GBN to avoid serious problems
(getting blocks/numbers totally mixed up in worst
case conditions).
29
Questions
1. What is the difference between Message and
Block?2. How does the polynomial Code Checking
method works? What is the polynomial agreed by
the CCITT as standard?3. With the aid of a
diagram explain the operation of the logic
circuit for the above method.4. Explain the
technique of Idle Repeat Request.5. Explain
the operation of the Continuous Repeat Request
method and compare and contrast with the Idle RQ
method.6. With the aid of diagrams explain the
operation of the Go-Back-N and Selective
Retransmission techniques.7. Compare and
contrast the above two techniques.
Write a Comment
User Comments (0)
About PowerShow.com