Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I do not see these definitions as quite right:

>Asynchrony: the possibility for tasks to run out of order and still be correct.

I like this. Great addition and yes it was missing.

>Concurrency: the ability of a system to progress multiple tasks at a time, be it via parallelism or task switching.

I would say here, be it multiprocessing or task switching.

>Parallelism: the ability of a system to execute more than one task simultaneously at the physical level.

This is technically multiprocessing as expressed above.

So, what is the difference between parallelism and concurrency?

Parallel tasks are like shaders. It is the same task, running many instances at the same time at the physical layer.

GPU devices are capable of parallel computing, for example.

Concurrent tasks are different tasks running at the same time at the physical layer. Often, the data is different too. Say a sprite engine running at the same time as a video display driver on the physical layer.

The shaders can all be running the same code but are processing different data elements, say each pixel having a position and is part of a larger rendering.

A GPU is a massively parallel multiprocessor.

A Threadripper is a massive Concurrent multiprocessor. It can also perform as a modest parallel multiprocessor.

The difference lies in what the various compute units can do and what they are actually doing.

Put another way, a 10ghz single core CPU is not a multiprocessor. It performs sequential computing and it can task switch to handle the same task load as a lower clock rate multiprocessor would handle.

A 10ghz multi core CPU is a concurrent multiprocessor, but is not a GPU. It could run shaders on par with a lower clock GPU. BUT a lower clock GPU cannot run a variety of tasks in the same way.



> Parallel tasks are like shaders. It is the same task, running many instances at the same time at the physical layer.

That’s single instruction multiple data which I would argue is an orthogonal concern. A better example of parallelism would be FPGAs. All of the gates are switching all at the same time* and you have to actually figure out how to synchronize the whole lot to get anything useful out of them.

* PLL notwithstanding


Yes, SIMD is a form of parallel computing. But that is not the only form. A shader is one, and the difference is lots of instructions and lots of data. It is just the same instructions executing in all the instances.

Concurrent would be many tasks running at the same time with each task containing different jnstructions on either the same data, or different data.


A single-threaded CPU can do concurrent processing just fine - this is an important distinction compared to parallelism, and I think you are muddying the two up a bit here.


I agree with you and thought I was clear on that.

In fact, there is no effective difference between a very fast single thread, sequential compute CPU and a multiprocessor, or multi-core CPU.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: