350 likes | 503 Views
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. Where does multiplexing occurs?.
E N D
CSC 335Data CommunicationsandNetworking Lecture 4c: Communication and Multiplexing Dr. Cheer-Sun Yang
Multiplexing Carrying multiple signals from multiple sources over one medium is called multiplexing.
Where does multiplexing occurs? • Computer systems: one CPU is connected to many workstations • US mail • Print spools • TV programs (why? Explained later)
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.
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.
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.
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.
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.
Wave Division Multiplexing • Used in optical communication systems • Different color is represented by different spectrum
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.
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.
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.
Receiving and Interpreting a Huffman-Code Message What characters are we sending/receiving? Bit stream transmission (011100011101101101111) First character sent Last character sent A BECA DBC
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.
How do we find Huffman Code for a group of characters?Note: Huffman Code may not be unique.
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.
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.
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.
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.
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?
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.
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.
Required Reading • Shay, Section 3.1, 3.2, 3.3,3.5 • Exercises