

Introduction to Concurrency - gshrikant
http://cs.lmu.edu/~ray/notes/introconcurrency/

======
taeric
I was expecting something that would be a bit more controversial. I highly
recommend reading through to the linked "neutral" analysis. Seeing evented and
threaded styles as duals of each other is fairly useful. Especially if you
take that to realize that ultimately you want to see the flow of the data.
Oftentimes the specifics of implementation are more noisy than they need to
be.

------
toolslive
I think concurrency has nothing to do with doing things "at the same time".
Concurrency is about overlapped execution, and you can very well have
concurrency without parallelism.

It might be one of those terms in computer science that has multiple
definitions.

~~~
jerf
Sorry, which term do you think is precisely defined such that all language
communities would agree with your definition without question?

So far as I know, there are none.

~~~
fizixer
Rob Pike gave a feature-length talk on the very topic of 'concurrency vs
parallelism' and although I gave up 20 minutes in (I don't think I was getting
what he was trying to say), I assume there might be a notion behind what we
call concurrency that stands independently of the parallelism/serialism
divide, maybe at a different level of abstraction.

I still don't understand what that notion is, that warrants using a new word
other than the existing multitasking/multithreading on a single core, or
parallel-processing on multiple-cores, or distributed-computing on a
cluster/network. (maybe that's what it is? three different ways of achieving
concurrency? but then all of it could easily be called "parallel-processing"
or "multitasking")

In any case, I think an article about "Introduction to Concurrency" can be
considered incomplete without a discussion of comparing/contrasting it with
parallelism.

~~~
superuser2
>I still don't understand what that notion is

I was taught that the division is the _goal_.

You use concurrency _because_ having multiple execution contexts at "the same"
time is useful, even if they are merely interleaved by the thread scheduler on
the same core. E.g. an IRC server: having a thread per socket, blocking until
there is some I/O to be performed on that socket, is a very workable,
straightforward design.

A concurrent process is concurrent for design reasons, and could not (sanely)
be any other way.

You use parallelism _because_ your problem gets solved faster when worked on
in parallel instead of sequence (and obviously not all problems are this way.)
A parallel program running on a single core machine would not buy you any
performance increase (and its design is unnecessarily convoluted.)

A parallel process is parallel for performance reasons, but could be run (just
proportionally slower) on a single core.

~~~
fizixer
> You use concurrency because having multiple execution contexts at "the same"
> time is useful, even if they are merely interleaved by the thread scheduler
> on the same core. E.g. an IRC server: having a thread per socket, blocking
> until there is some I/O to be performed on that socket, is a very workable,
> straightforward design.

So concurrency is a technical/academic/generalized term for "multitasking".
And yet:

\- the article doesn't mention that word.

\- Wikipedia on concurrency doesn't mention the word.

\- Wikipedia on multitasking is a separate article (that does mention
concurrency but doesn't clarify the relationship between the two: one being a
generalization of the other).

\- And people go on length trying to explain the "difference" between the
terms, without making a helpful connection [0]

Weird, as always!

[0] [http://www.quora.com/What-is-the-difference-between-
multitas...](http://www.quora.com/What-is-the-difference-between-multitasking-
and-concurrency-in-programming)

------
degenerate
The page just sort of... ends. There is no conclusion, link to further
reading, or anything useful at the end :\

~~~
rtoal
Great observation. Fixed.

~~~
aseal
Dr. Toal- as a former student (decade plus) made me smile to see your post up
on HN. Hope all is well.

~~~
bhauer
Agreed. It's awesome to see some rtoal material on HN this morning!

------
gamdev
This is down? Any chance for a reupload?

~~~
rtoal
Power outage. It is back up.

