What is the difference between concurrency and parallelism?

前端 未结 30 2661
清歌不尽
清歌不尽 2020-11-22 00:21

What is the difference between concurrency and parallelism?

Examples are appreciated.

30条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-22 01:11

    Concurrency is the generalized form of parallelism. For example parallel program can also be called concurrent but reverse is not true.

    1. Concurrent execution is possible on single processor (multiple threads, managed by scheduler or thread-pool)

    2. Parallel execution is not possible on single processor but on multiple processors. (One process per processor)

    3. Distributed computing is also a related topic and it can also be called concurrent computing but reverse is not true, like parallelism.

    For details read this research paper Concepts of Concurrent Programming

提交回复
热议问题