What is the difference between synchronous and asynchronous data transfer?
synchronous usually means the caller has to wait for the data to complete before it can do other tasks. asynchronous usually means the caller registers to be notified when the data transfer is complete, so it can initiate the data transfer and then carry on with other tasks. when the thread that is performing data transfer is complete, it notifies the caller and the caller can then act on that notification as appropriate. so synchronous is a blocking operation and asynchronous is a non-blocking (or parallel) operation.
So synchronous transfer is faster?
depends what you mean by "faster". in a multi-CPU machine, the asynchronous one would be faster because the caller can carry on and do other work while the data transfer operation is underway.
I'm talking about a same machine....obviously you don't make comparisons for separate circumstances.
I'm also taking about the same machine. modern hardware come with multi-core multi-CPUs.
also data transfer is usually a MUCH slower operation than running non-data transfer code. so making it asynchronous will usually result in greater thru-put for your app.
I got you.....but which one is reliable......the one with parity check or use of check digit?
reliability depends on a lot of factors - not just parity/digit checks. you can probably google an answer for that depending on exactly how your data transfer is taking place.
But as far as I know, bits tend to be lost and corrupt in synchronous transfer which does not use parity bits.
Synchronous and asynchronous data transfers have nothing to do with corruption, parity bits, etc. These are completely orthogonal concepts. You can do one or the other with synchronous, and you can do one or the other with asynchronous transfers. In fact, generally speaking, whether or not your transfer is sync or async is independent from what the protocol is that is being used to transfer the data, and it's at the protocol level that things like parity bits are specified.
Here is an article from my blog you might find helpful ( http://tipsfromthetech.blogspot.com/2011/07/part-2-asynchronous-and-synchronous.html).
Join our real-time social learning platform and learn together with your friends!