Powered By Blogger

Saturday, July 30, 2011

Part 2 - Asynchronous and Synchronous Transmission

In asynchronous communication, there is no synchronization between the clients. The sending computer just sends a continuous stream of data to the receiving computer [1]. Connection parameters are not negotiated before transmission of the data, so “Asynchronous is sometimes called ‘best effort’ transmission because one side simply transmits, and the other does it's [sic] best to receive” [2]. The receiver does receive some help from the sender. The stream is embedded with start and stop bits to help the receiver coordinate the data. In addition, the modem handles error control using parity bits. A parity bit is a one or a zero at the end of each fragment of data. The number of ones in the fragment of data determines the parity bit. If the total number of ones in the fragment is odd, then the parity bit will be a one, if the number is even then the parity bit will be a zero. The receiving modem counts the number of ones in the fragment then compares that to the parity bit. If there is a mismatch then the modem sends a request for a retransmission [1].

Synchronous transmission is essentially the opposite. Connections are established and a protocol is used to coordinate the transmission. The protocols used in synchronous transmission are “Synchronous Data Link Control, High-level Data Link Control, and Binary Synchronous (bisync) communications. These protocols format the data into blocks, add control information, and check the information for errors” [1]. Since these protocols function on the Data Link Layer instead of the Physical Layer like asynchronous transmissions, error detection and correction is more sophisticated and accurate. Timing is also used to coordinate the transmission. Instead of start and stop bits, groups of bits (frames) are separated by a timing scheme. To ensure that the computers stay in sync, occasionally “synch bits” are sent in the transmission. According to Tomsho et al., “Asynchronous (async) communication is the most popular for communicating with a modem because it uses regular telephone lines” [1]. This statement is a testament to how fast telecommunications technology has come in seven years since DSL and cable is now the most popular standard for data transmission.

There are some obvious pros and cons to each transmission method, the main ones being speed and reliability.  Asynchronous transmission can be considerably faster than synchronous transmission in most cases since data is capable of flowing in either direction simultaneously using full-duplex transmission (I will explain simplex and duplex transmission in part 4).  However, asynchronous transmission has no error control and data can be lost or dropped.  This is especially true with full-duplex transmissions because there is more chance for data "collisions" to occur.  Synchronous transmission is therefore more reliable yet slower.  Since data is organized into predetermined chunks and sent with a predefined timing (usually using half-duplex transmission), there is much less chance for data loss or corruption.  Add in more sophisticated and accurate error detection and intermittent transmissions to keep the computers in sync, and you have a highly reliable method to transmit data.  So in practical terms, it is best to use synchronous transmission when data integrity is vital and asynchronous when speed is more important than data integrity.  For example, asynchronous transmission is often used in online gaming because the game state is changing so fast and often that the loss of a few bits of data is of little consequence since it is rapidly replaced.  Conversely, synchronous transmission is often used during file transfer and in peer-to-peer applications since data integrity is much more important.

So far I have been referring to synchronous and asynchronous transmissions as they specifically apply to network communication, but there is application of the same concepts in the realm of software engineering when we see the use of threading.  However, threading exceeds the scope of this article so I will not go into it here.  Perhaps it would make a good discussion topic to have within the comments of this post.

This concludes the Part 2 of the the Data Transmission and Protocol series.  In part three, I will be discussing analog and digital signals.  Very interesting if you have ever wondered "what is the difference between the music that comes from a CD versus that which comes from a vinyl record?"

Resources:
[1] Tomsho, G., Tittel, E., & Johnson, G. (2004). Guide to networking essentials. Thomson Course Technology: Boston, MA. ISBN-13: 978-1-4188-3718-1
[2] InetDaemon Enterprises. (2010). Asynchronous vs. synchronous. Retrieved from http://bit.ly/pOhOl8

No comments:

Post a Comment