Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Operating Systems and Computer Networks
L9 – Network transmisson
Prof. Dr.-Ing. Axel HungerAlexander Maxeiner, M.Sc.
Institute of Computer EngineeringFaculty of Engineering
University Duisburg-Essen
Dr.-Ing. Pascal A. Klein & Alexander Maxeiner M.Sc.
Alexander Maxeiner, M.Sc.University Duisburg-Essen
2Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Transmission methods
Stuffing
Code efficiency
Optimal block size
CSMA
CSMA/CD
Overview of content
Alexander Maxeiner, M.Sc.University Duisburg-Essen
3Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
A message is organized in frames which size is defined by the transmission protocol.
Each frame consists of the header, the trailer and the payload data.
The header carries all the information necessary for correct synchronization, destination, control setup.
The trailer contains the checkup information and end of transmission flags.
The payload of a message is the pure information that a higher level wants to transmit.
Frames
Alexander Maxeiner, M.Sc.University Duisburg-Essen
4Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Sender and receiver within a network need a standard of communication to understand each others messages.
During the development of network communication several methods were implemented.
Four attributes can be applied to a transmission:
– Asynchronous transmission
– Synchronous transmission
– Bit oriented
– Byte oriented
Transmission methods
Alexander Maxeiner, M.Sc.University Duisburg-Essen
5Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Overview
Alexander Maxeiner, M.Sc.University Duisburg-Essen
6Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
A synchronous transmission between sender and receiver is accompanied by timing signals in regular intervals.
An external clocking mechanism is responsible for those timing signals and data packages are only send in fixed intervals.
Once a connection is established a continuous stream of data in large blocks is send to the receiver.
Once the connection is established and synchronized there is no reason to leave gaps between symbols
Connection used for streaming services
Synchronous transmission
Alexander Maxeiner, M.Sc.University Duisburg-Essen
7Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
An asynchronous transmission starts with a specific code word to tell the receiver the clock speed of the incoming message.
Data words are marked with start- and stop bits to show the receiver where the payload begins and ends.
During a transmission idle times may occur. The sender sends a bit stream of logical ones to indicate a gap during transmission.
Changing the channel back to zero indicates a new data word, introduced by a code sequence for the start word.
Asynchronous transmission
Alexander Maxeiner, M.Sc.University Duisburg-Essen
8Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
A bit oriented transmission describes a transmission method where the data stream is encoded and decoded by special sequences of bit.
The payload is not segmented into blocks, everything besides key sequences is pure data.
Bit oriented protocols have less overhead than byte oriented protocols but lack security measures.
Example for Bit-oriented data link protocol: HDLC (High-level Data Link Control)
HDLC was derived from SDLC by the ISO and is used as point-to-point protocol.
Bit oriented
Alexander Maxeiner, M.Sc.University Duisburg-Essen
9Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
What happens if the payload contains data sequences that could be interpreted as the start/stop sequence?
Receiver will misinterpret the data sequence and end the transmission prematurely.
To prevent such an event, bit stuffing is done.
Sender checks payload data and adds an artificial zero after each 5th bit, thus changing the message.
Receiver removes every 0 that occurs after the 5th logical 1.
Code efficiency?
Bit stuffing
Alexander Maxeiner, M.Sc.University Duisburg-Essen
10Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
In byte oriented transmission protocols sequences of bits are segmented into fixed blocks with the size of 8 Bits (=1Byte).
Those bytes represent a specific code word according to the ASCII table and therefor fulfill a specific function.
Messages are equipped with a header and a trailer, filled with code words to ensure correct transmission and relay instructions for the next layer within the receiver as well as checksum bytes for error detection.
Example for byte oriented message transmission is the UART (Universal Asynchronous Receiver-Transmitter), a communi-cation interface present in almost every microcontroller.
Byte oriented
Alexander Maxeiner, M.Sc.University Duisburg-Essen
11Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
ASCII table
Alexander Maxeiner, M.Sc.University Duisburg-Essen
12Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
What happens if the payload contains a sequence of bytes that could be interpreted by the receiving station as header- / trailer information.
Payload information could end the transmission before it is supposed to end.
Solution: Byte stuffing.
Adding keywords to the payload to indicate an exception.
Sender and receiver must use same stuffing method.
– Adding DLE-bytes
– Adding STX/ETX brackets
– Different method depending on structure of header/trailer
Byte stuffing
Alexander Maxeiner, M.Sc.University Duisburg-Essen
13Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Code efficiency in network transmission describes the ratio between pure payload and control bytes as well as the necessity of additional messages for error detection/correction.
Network transmission should be efficient. Too much overhead reduces the amount of payload that will be transmitted within a fixed interval/frame.
In an ideal scenario huge sets of payloads are transmitted with only small headers/trailers to maximize throughput. In reality transmissions are not perfect and errors would result in retransmission, lowering the overall throughput.
To determine the efficiency of a transmission the static and dynamic code efficiency needs to be analyzed.
Code efficiency
Alexander Maxeiner, M.Sc.University Duisburg-Essen
14Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Static code efficiency describe the ratio between system relevant information within a frame of fixed size n and the size of pure payload.
𝜂 =𝑆𝑖𝑧𝑒𝑃𝑎𝑦𝑙𝑜𝑎𝑑𝑆𝑖𝑧𝑒𝐹𝑟𝑎𝑚𝑒
∗ 100%
Should byte stuffing have occurred the size of the payload needs to be changed to reflect the additional control bytes.
The total size of a frame will not change due to byte stuffing, thus the amount of payload per transmission is reduced.
𝜂 =(𝑆𝑖𝑧𝑒𝑃𝑎𝑦𝑙𝑜𝑎𝑑 −𝐴𝑑𝑑𝑖𝑡𝑖𝑜𝑛𝑎𝑙 𝐵𝑦𝑡𝑒𝑠)
𝑆𝑖𝑧𝑒𝐹𝑟𝑎𝑚𝑒∗ 100%
Static code efficiency
Alexander Maxeiner, M.Sc.University Duisburg-Essen
15Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Dynamic code efficiency takes potential errors during the transmission into account.
The total size of a frame is defined by the transmission protocol. Should the size be very large in order to achieve a good static code efficiency problems will occur if the transmission is plagued with a high error rate.
Faulty transmissions result in retransmissions. Large frames are more prone for individual errors. Thus smaller frames are more reliable on erroneous transmission lines and the overall throughput of data increases.
Dynamic code efficiency is dependent on the average error rate of the transmission medium to make a prediction.
Dynamic code efficiency
Alexander Maxeiner, M.Sc.University Duisburg-Essen
16Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
If the average error rate is known a system could calculate the optimal block length for a transmission.
𝑏𝑜𝑝𝑡 describes the value, where static and dynamic code
efficiency are at its best.
Optimal block size
Alexander Maxeiner, M.Sc.University Duisburg-Essen
17Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
In shared network topologies protocols are implemented that scan the network for occupied/free transmission lines before transmitting data to avoid collisions on the line.
Those protocols are called CSMA (Carrier Sense Multiple Access) protocols.
‘Carrier Sense’ means, that the device connected to the transmitting medium is ‘sensing’ the line before initializing transmission. If the channel is in use, the device waits.
‘Multiple Access’ describes that more than one device can use the same network and share the same transmission method.
CSMA Protocols
Alexander Maxeiner, M.Sc.University Duisburg-Essen
18Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
There are several types of CSMA protocols in use.
– 1-persistent CSMA
– Non-persistent CSMA
– P-persistent CSMA
Additionally there is an improvement to the CSMA protocols that includes collision detection.
CSMA/CD is the most popular MAC protocol up to date.
Type of CSMA
Alexander Maxeiner, M.Sc.University Duisburg-Essen
19Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
1-persistent CSMA listens to the channel to determine if it is free or not.
If the channel is occupied it keeps scanning until the channel is free. Should there be a collision on the line the protocol waits for a random amount of time to restart its function.
If a channel is idle the protocol sends its message with a probability of 1.
This protocol has the highest chance of a collision since multiple devices would transmit the data as soon as the channel is detected to be free.
Advantages: High throughput if few devices are trying to send simultaneously.
1-persistent CSMA
Alexander Maxeiner, M.Sc.University Duisburg-Essen
20Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Non-persistent CSMA listens to the channel to determine if it is free or not.
If the channel is occupied it waits for a random amount of time (within limitations) before it restarts its scanning of the channel.
If the channel is detected to be free during the scanning process the data is send immediately.
Less chance of collisions during transmission, since several devices must have detected the idle channel at the same time, which has a decreased probability due to the random waiting timer.
Non-persistent CSMA
Alexander Maxeiner, M.Sc.University Duisburg-Essen
21Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
P-persistent CSMA
P-persistent CSMA listens to the channel to determine if it is free or not.
If the channel is occupied it keeps scanning until the channel is free. Should there be a collision on the line the protocol waits for a random amount of time to restart its function.
If the channel is free it sends its data with a probability of p and waits some random time with the probability of (1-p).
Less chance of collisions during transmission, since several devices that detect the channel to be free have to transmit at the same time.
Alexander Maxeiner, M.Sc.University Duisburg-Essen
22Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Collision detection allows a CSMA protocol to stop transmitting as soon as a collision is detected.
Both stations monitor the channel for collisions while transmitting. A high voltage on the line indicates a collision
-> transmission is aborted and a random amount of time will be waited until retransmission begins.
Performance analysis shows that the system throughput can be
calculated as: 𝜌 =1
1+6.44 𝛼
𝜌 = System throughput, 𝛼 = propagation time [𝜏 (usually 5𝜇𝑠
𝑘𝑚)]
over average packet transmission time (𝑇).
𝛼 =𝜏
𝑇
Collision detection
Alexander Maxeiner, M.Sc.University Duisburg-Essen
23Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Questions?
Alexander Maxeiner, M.Sc.University Duisburg-Essen
24Prof. Dr.-Ing. Axel HungerInstitute of Computer Engineering OSCN – Process Scheduling
Tanenbaum, Andrew S., “Computer Networks”, 4th edition, Pearson Education Inc, Amsterdam, Netherlands, 2003.
Tanenbaum, Andrew S., “Computernetzwerke”, 4th edition, Pearson Education Inc, Amsterdam, Netherlands, 2003.
Resources