What is the difference between multi-threaded and parallel parallel vs asynchronous programming?

For several days, I have been wondering what is the difference between these four types of programming. I am looking for information on google, but I cannot answer my question, so I decided to ask you, can someone please explain to me? Thank!

+3


source to share


1 answer


The programming keywords you mentioned refer to techniques invented for specific reasons to solve computational and processing problems.

A brief summary of what each method seeks to solve:

  • Concurrency : There are many tasks at hand, I need steady progress on each one rather than completing one and moving on to the next in a sequential approach. Let me work on each of the processes so that there is nonzero progress on two or more tasks at a given time . (not necessarily simultaneous)

  • Parallelism . There is a potential for work per unit of time, given the resources of my device. Let me use some techniques to increase throughput , perhaps sacrificing latency to make my tasks complete faster.

  • Multithreading . Both devices and device software support more than one thread of execution in a program; Let me split the compute intensive on these CPUs / cores / thread pools!

  • Asynchrony : a set of tasks that need to be done. I am doing one of them at the moment . Let me call my friend to help me with another task, I hope he / she will return to me with the results while I continue with my task.

Note that the above methods are not necessarily mutually exclusive. In particular, multithreading is a type of parallelism, which in turn results in a degree of concurrency greater than 1 (non-trivial multithreading).



By the way, I have maintained a blog about parallel computing. In one post I wrote about the jargon used in the same field.

http://magical-parallel-computing.blogspot.in/2017/04/parallel-computing-jargon.html

I hope this helps you conceptually.

+6


source







All Articles