← Back to context

Comment by preseinger

3 years ago

a program (as written) is either concurrent or not, a program (as executed) is either parallel or not

a program which is not written as concurrent can never be executed as parallel

a program which is written as concurrent can be executed as parallel, or not

> The situation you describe (when there's a single processor core) isn't parallel or concurrent.

a program running on a single core can never be parallel, but it can be concurrent

concurrent is a logical property, parallel is a physical property

"a program which is not written as concurrent can never be executed as parallel"

Unless of course you're running multiple independent instances of it, each with different parameters, which I gather is a pretty common way of running long running CPU- intensive operations on large data sets. Presumably there's often some final separate step that may be needed to combine the results once they're all finished, which if run manually obviates any concurrency concerns at the software level.

  • in which case that program is being executed N times, so none of this applies

    ("a program [as executed]" is a single instance (process) of a binary)