3 ms·
That example is not correct, a key concept in concurrency is that it gives way to potential parallelism, but this does not follow from the queues and coffee mac
by sean-duffy 11y ago
That example is not correct, a key concept in concurrency is that it gives way to potential parallelism, but this does not follow from the queues and coffee machines analogy.
- simoncion 11y ago> ...a key concept in concurrency is that it gives way to potential parallelism, but this does not follow from the queues and coffee machines analogy. How do you figure? From TFA: > A lot of software systems are useful to reason about as having multiple threads of control — for instance, separate clients connecting to a server, or separate UI widgets. Programs that are organized this way exhibit concurrency. The fact that multiple threads of control are a good way of organizing and reasoning about certain programs is orthogonal to whether those programs are running on one processor core or four or 1000. One queue of people executing the "get espresso from the coffee machine" routine and another queue executing the "get drip coffee from the coffee machine" routine seems like concurrency to me. Two different routines are competing for the use of a single resource, but neither routine needs to know about the other -if we presume that there's a work scheduling system in place-. What's more, this trivially gives way to parallelism: add another coffee machine (which is analogous to another CPU core) and assign one of the queues to that machine. BAM! Instant parallelism. What am I misunderstanding here?