←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 #
threatofrain ◴[] No.44609420[source]
Concurrency is the property of a program to be divided into partially ordered or completely unordered units of execution. It does not describe how you actually end up executing the program in the end, such as if you wish to exploit these properties for parallel execution or task switching. Or maybe you're running on a single thread and not doing any task switching or parallelism.

For more I'd look up Rob Pike's discussions for Go concurrency.

replies(1): >>44609486 #
1. tines ◴[] No.44609486{3}[source]
The article understands this.
replies(1): >>44609541 #
2. threatofrain ◴[] No.44609541[source]
> Concurrency: the ability of a system to progress multiple tasks at a time, be it via parallelism or task switching.

Okay, but don't go with this definition.

replies(1): >>44610194 #
3. michaelsbradley ◴[] No.44610194[source]
Is the hang up on "at a time"? What if that were changed to something like "in a given amount of time"?

For single threaded programs, whether it is JS's event loop, or Racket's cooperative threads, or something similar, if Δt is small enough then only one task will be seen to progress.