what's the difference between parallel and mul

2019-05-23 00:13发布

I think the topic says it all. What's the difference, if any, between parallel and multicore programming? Thanks.

3条回答
Lonely孤独者°
2楼-- · 2019-05-23 00:31

The difference isn't in approach, just in the hardware the software runs on. Parallel programming is taking a problem and spliting the workload into smaller pieces that can be processed in parallel(Divide and Conquer type problems, etc.) or functions that can run independently of each other. Place that software on a multi-core piece of hardware and it will be optimized by the OS to run on the different cores. This gives it a better performance because each thread you create to do concurrent work can now run without consuming CPU cycles on a single processor/core.

查看更多
萌系小妹纸
3楼-- · 2019-05-23 00:40

Multicore systems are a subset of parallel systems. Different systems will have different memory architectures, each with their own set of challenges. How does one system deal with cache coherency? Is NUMA involved, etc. etc.

查看更多
一纸荒年 Trace。
4楼-- · 2019-05-23 00:53

Mutli-core is a kind of parallel programming. In particular, it is a kind of MIMD setup where the processing units aren't distributed, but rather share a common memory area, and can even share data like a MISD setup if need be. I believe it is even disctinct from multi-processing, in that a multi-core setup can share some level of caches, and thus cooperate more efficiently than CPUs on different cores.

General parallel programing would also include SIMD systems (like your GPU), and distributed systems.

查看更多
登录 后发表回答