←back to thread

289 points kristoff_it | 3 comments | | HN request time: 0s | source
Show context
threatofrain ◴[] No.44609107[source]
IMO the author is mixed up on his definitions for concurrency.

https://lamport.azurewebsites.net/pubs/time-clocks.pdf

replies(4): >>44609321 #>>44609563 #>>44610163 #>>44611854 #
tines ◴[] No.44609321[source]
Can you explain more instead of linking a paper? I felt like the definitions were alright.

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

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

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

replies(9): >>44609334 #>>44609420 #>>44609491 #>>44609531 #>>44609532 #>>44609822 #>>44609915 #>>44610273 #>>44611918 #
Lichtso ◴[] No.44609531[source]
Concurrency is parallelism and/or asynchrony, simply the superset of the other two.

Asynchrony means things happen out of order, interleaved, interrupted, preempted, etc. but could still be just one thing at a time sequentially.

Parallelism means the physical time spent is less that the sum of the total time spent because things happen simultaneously.

replies(3): >>44609697 #>>44610257 #>>44613039 #
jrvieira ◴[] No.44609697[source]
careful: in many programming contexts parallelism and concurrency are exclusive concepts, and sometimes under the umbrella of async, which is a term that applies to a different domain.

in other contexts these words don't describe disjoint sets of things so it's important to clearly define your terms when talking about software.

replies(2): >>44609817 #>>44609977 #
merb ◴[] No.44609817[source]
Yeah concurrency is not parallelism. https://go.dev/blog/waza-talk
replies(1): >>44610041 #
1. Lichtso ◴[] No.44610041[source]
That is compatible with my statement: Not all concurrency is parallelism, but all parallelism is concurrency.
replies(2): >>44610270 #>>44614508 #
2. OkayPhysicist ◴[] No.44610270[source]
What people mean by "concurrency is not parallelism" is that they are different problems. The concurrency problem is defining an application such that it has parts that are not causally linked with some other parts of the program. The parallelism problem is the logistics of actually running multiple parts of your program at the same time. If I write a well-formed concurrent system, I shouldn't have to know or care if two specific parts of my system are actually being executed in parallel.

In ecosystems with good distributed system stories, what this looks like in practice is that concurrency is your (the application developers') problem, and parallelism is the scheduler designer's problem.

3. jlouis ◴[] No.44614508[source]
SIMD is parallel execution with no concurrency.