Difference Between Synchronous and Asynchronous
Synchronous vs Asynchronous
Synchronous and asynchronous are two big words that seem intimidating but are quite simple. Synchronous simply means that all events are occurring in a certain time order that can be predicted. A certain event would always follow another and they can’t be interchanged. Asynchronous is the opposite of synchronous. In asynchronous processes, there is no time order. Certain events can, and often do, interchange. An excellent synchronous example is music. Each participating instrument needs to be in rhythm with the others or else the music won’t sound right. For asynchronous, a good example would be traffic. Vehicles move at different rates of speed and it is common for one to move past another.
In most applications, synchronous operation is essential as having an asynchronous operation would literally mean chaos. Examples of this are railways and airports. In these scenarios, it is important to know which vehicle goes first in order to avoid collisions. The order of things are carefully planned to facilitate a smooth flow and changes to the plan are few and far in between.
Although synchronous operation is often preferred, there are certain cases where it is not needed. There are even cases where synchronous operation can be detrimental to the objective. An example where synchronous operation is not really necessary is in internet browsing. Prior to AJAX (Asynchronous Javascript and XML) most webpages need to be reloaded in its entirety to change the information on a small section. With AJAX, it is now possible to update that certain section while leaving the rest of the page untouched. This is beneficial as a smaller amount of data needs to be transmitted and the user doesn’t have to endure through the whole page refreshing. AJAX is asynchronous because page updates are no longer synchronized.
In computer operations, I/O is an area where synchronous operation becomes detrimental. Synchronous operation in this regard mean that the processor needs to wait for the data to be written or read before it can continue. The problem is, I/O devices like hard drives and especially floppy drives, which have mechanical parts, are very slow. If the processor needs to wait for the drive to finish, it would be wasting a lot of time. Asynchronous operation allows the processor to do other things while waiting for the read/write to finish and just carry on once the operation has succeeded.
Summary:
Synchronous means in time order while Asynchronous means no time order
Synchronous is preferred over asynchronous in many real world applications
Synchronous can perform worse in certain scenarios than asynchronous
- Difference Between Sony Cybershot S Series and W Series - December 22, 2012
- Difference Between Samsung Galaxy S3 and iPhone 5 - December 21, 2012
- Difference Between Samsung Galaxy S2 (Galaxy S II) and Galaxy S 4G - December 20, 2012
Search DifferenceBetween.net :
Email This Post : If you like this article or our site. Please spread the word. Share it with your friends/family.
This is one of the best explanations I have read of the difference between sync and async. I love the simplicity of the examples! Well done.
This is an outstanding and the most clear explanation. Thank you thank you and thank you. You are awesome.
thanks