Threading vs Parallelism, how do they differ?

前端 未结 9 2123
后悔当初
后悔当初 2020-12-04 07:15

What is the difference between threading and parallelism?

Which one has advantage over the other?

9条回答
  •  北海茫月
    2020-12-04 07:48

    If we think CPU as a company and threads as its workers then, it help us to understand threading and parallelism more easily.

    Like a company have many workers, the CPU also have many threads.

    Also there may be more than one company and therefore there may be more than one CPU's.

    Therefore when workers(threads) work in a company(CPU), it is called threading.

    And when two or more companies(CPU) work independently or together, it is called parallelism.

提交回复
热议问题