Top Banner
CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang
35

CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Dec 27, 2015

Download

Documents

Kelly Underwood
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

CSC 335 Data Communications

and Networking

Lecture 4c: Communication and Multiplexing

Dr. Cheer-Sun Yang

Page 2: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Multiplexing

Carrying multiple signals from multiple sources over one medium is called multiplexing.

Page 3: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Where does multiplexing occurs?

• Computer systems: one CPU is connected to many workstations

• US mail

• Print spools

• TV programs (why? Explained later)

Page 4: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Frequency Division Multiplexing• FDM: two or more signals that uses different carrier

frequencies can be transmitted over a single medium simultaneously without interference.

• Commonly used in television and radio transmission.• A multiplexor receives analog signals from multiple

sources, each of which has a specific bandwidth. • The signals are combined into another, more complex

signal with a much larger bandwidth.

Page 5: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Example of FDM

Page 6: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Frequency Division Multiplexing

• Engineers have used FDM to build a variety of network technologies that permit independent communications to proceed simultaneously over a single underlying medium.

• For example, the transmitters and receivers used with some wireless networks can be tuned to a specific channel, making it possible to have two independent sets of computers in a single room communicating at the same time.

Page 7: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Frequency Division Multiplexing

• Baseband: all the available bandwidth is used to derive a single high bit rate transmission path (channel).

• Broadband technology: the available bandwidth is divided into a number of lower bandwidth subchannels on one cable.

Page 8: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Time Division Multiplexing

• TDM is used to share the available capability of a baseband channel. Two types of TDM are used:• Synchronized (or fix cycle): Each user has

access to the channel at precisely defined (synchronized) time intervals.

• Asynchronous (or on demand): Users have random access to the channel and, once a user has acquired access, is the sole user of the channel for the duration of the transmission.

Page 9: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Time Division Multiplexing

Page 10: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

What multiplexing techniques does TV uses?

• Frequency Division Multiplexing: Signals of different frequencies can be transmitted simultaneously.

• Time Division Multiplexing: Commercials and regular programs are transmitted at different time period. The two sub-channels are regular program and advertising sub-channels.

Page 11: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Statistical Multiplexing

Page 12: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Wave Division Multiplexing

• Used in optical communication systems

• Different color is represented by different spectrum

Page 13: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Example of WDM

Page 14: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Contention Protocol

• This section (Sec.3.4) is misplaced.

• Contention protocol is used for accessing media and usually is called media access sub-layer (MAC).

• It should be placed after Chapter 5.

Page 15: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Data Compression

• Data compression can be done as part of the Presentation Layer before messages are passed to Transport Layer at the sender side or before messages are passed to Application Layer before the Application Layer. It can also be done at the Physical Layer.

• We discuss Huffman Code, and Run Length Code, Relative Encoding, and Lempel-Ziv Encoding briefly.

Page 16: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Huffman Code

• Usually, we can use ASCII code (a fixed length coding) to encode characters prior to sending a file.

• However, if the file contains only some characters whose frequencies of appearance in the file are known, we can use Huffman Code to shorten the total length of data bits to be transmitted.

Page 17: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Example of Huffman Code

Letter Frequency Code

A 25% 01

B 15% 110

C 10% 111

D 20% 10

E 30% 00

Page 18: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

How do we interpret a stream of characters?

Page 19: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Receiving and Interpreting a Huffman-Code Message

(011100011101101101111)

What characters are we sending/receiving?

First character sent

Lastcharacter sent

Bit stream transmission

A B E C A D B C

Page 20: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

No-Prefix Property

• Huffman Code works due to this property.

• The code for any character never appears as the prefix of another code.

• For example, the Huffman Code for A is 01, so no other code starts with a 01.

Page 21: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

How do we find Huffman Code for a group of characters?

Note: Huffman Code may not be unique.

Page 22: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.
Page 23: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.
Page 24: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.
Page 25: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.
Page 26: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.
Page 27: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Run-Length Code

• Used in compress 0’s in an image file.

• Usually, the image file contains only 0’s and 1’s to indicate that there is a dot or there is no dot in the image.

Page 28: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Run-Length Code Rules• Rule 1: express the number of 0’s with a

decimal number using four bits. The receiver need to append a one bit after inserting 0’s.

• Rule 2: if the number of zero’s is greater than what four bits can represent, use four more bits. The receiver need to know that if 1111 is received, it is part of the next four bits.

Page 29: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Run-Length Code Rules (cont’d)• Rule 3: How about 11? Use 0000 to

indicate that there are no 0’s in between two 1’s.

• Rule 4: What if a stream starts with a 1? Pad 0000 in front of the stream.

Page 30: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.
Page 31: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Another Run-Length Code

• If the data bits include more than just 0’s and 1’s, what can we do?

• We can send the character along with the run length.

Page 32: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Relative Encoding

• How about a video transmission where images may be very complex in contrast to black and white transmission of a fax or a text file?

• We can transmit the first frame and, then, the difference between the first frame and the second frame instead of the second frame itself.

• What is the advantage?

Page 33: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Lempel-Ziv Encoding

• If we can find some repeated letters or sequences of letters, such as the, them, ing, we can send special characters , , and , respectively.

• At the receiving end, the correlations will be used as well.

• Details ignored.

Page 34: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Image Compression

• JPEG (Joint Photographic Experts Group) : reduces the spatial redundancy found in many still pictures.

• MPEG (Moving Pictures Experts Group) : must deals with not only spatial redundancy found in many still pictures, but also the temporal redundancy across consecutive frames.

Page 35: CSC 335 Data Communications and Networking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang.

Required Reading

• Shay, Section 3.1, 3.2, 3.3,3.5

• Exercises