HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

What does synchronous and asynchronous mean in computer science?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
sciencewhatsynchronousasynchronousmeancomputerdoesand

Problem

Words synchronous and asynchronous can be met several times, in different contexts, when studying computer science. As an example :

  • Synchronous and asynchronous circuits.



  • Synchronous and asynchronous calls.



  • Synchronous and asynchronous messages.



I never really understood the real meaning of those terms, and also the common sense that different usages of synchronous and asynchronous have.

So my question is : What does synchronous and asynchronous really mean in computer science ?

Solution

As Discrete lizard suggests, there is not some precise CS-wide definition for these terms. Generally, you should not expect terms and notation to always mean the same thing even within a single field.

Nevertheless, a vague general statement is that in "synchronous" systems, things "wait" for other things, while in "asynchronous" systems, things don't "wait".

That said, it's probably better to split this into two broad interpretations of this. There's "synchronous" in the sense of everything moving in lock-step (i.e. everyone "waits" for the next "round" or everyone "waits" on a "clock"). This interpretation is probably the closer of the two to the colloquial notion. This applies to synchronous circuits, Bulk Synchronous Processing, and synchronous data flow. A synchronous circuit has a clock signal and it executes in time with the clock. An asynchronous circuit allows each subcomponent to execute whenever it's ready. It requires careful timing to make sure all the inputs to each subcomponent are ready when that subcomponent is ready.

The other interpretation is blocking where one thing makes a request to another thing and then sits there waiting for the response. The "waiting for the response" aspect is what is called "blocking". Synchronous calls/messages would fall under this. The alternative is to send a message and then continue on without waiting for a response. Any response is either ignored or collected in a "mailbox" to be read at some later time. This is often handled by the framework you're using which will then dispatch events to which you register.

The Ptolemy Project is a fantastic resource for in-depth thoughts on different models of computing and their notion of time.

Context

StackExchange Computer Science Q#87195, answer score: 6

Revisions (0)

No revisions yet.