Hacker News new | ask | show | jobs
by te_platt 5561 days ago
Parallelism is recognizing the 5 guys should be able to dig a ditch close to 5 times as fast as 1. Concurrency is making sure everyone has a shovel and is digging in the right place.
2 comments

Determinism is making sure the digging is in the right place. Non-deterministic digging may be possible, but it's harder to get right.

Concurrency could also be having one guy with one shovel, but digging iteratively in 5 separate places and digging a shovelful or two at a time.

Or to put it another way, parallelism is digging two ditches with 4 people 4 times as fast as 1 person digging two ditches; concurrency is 1 person digging two ditches at the same time, alternating; determinism is making sure that the two ditches are being dug correctly, at an even pace, etc.

Great illustration! I just imagine 5 ditches all over the place and going into 5 different directions and/or crossing, or one big hole as all 5 started at the same place and, while shoveling, were hitting each other with elbows and the other end of shovel, or, starting at the correct place and in the correct direction, just 1 guy digging at any given time while the other 4 waiting for their chance to dig. ( i did my share of digging at student summer construction projects some 20+ years ago :)