Concurrency
MultiThreading
MulticoreProgramming
SoftwareTransactionalMemory
Scalability
Closures
ActorModel
Erlang
Clojure
Threads are not the answer. Threads are the question. No is the answer. Why? Scalable != threading. Scalable == clustered / peer to peer / grid.[1]
We need to be headed primarily toward shared *nothing*. Sharing at the level prescribed in this paper, whether with locks or transactions, is simply uncalled for 99% of the time. Sequential processes with shared-nothing message passing should be the direction.
Lock-based programming, our status quo, is difficult for experts to get right. Worse, it is also fundamentally flawed for building large programs.
...
Lock-free programming is difficult for gurus to get right.
Concurrency Vs. Parallelism
- http://ghcmutterings.wordpress.com/2009/10/06/parallelism-concurrency/
- Concurrency: arbitrarily interleaved threads -> non-deterministic (because dependent on interleaving)
- control interleaving with synchronisation
- parallelism: running on multiple cores, hopefully faster than on single core
- in side-effecty languages, the only way to get parallelism is concurrency; it’s therefore not surprising that we often see the two conflated.
- A Kid's Guide to Concurrency And Parallelism
- http://www.danielmoth.com/Blog/2008/11/threadingconcurrency-vs-parallelism.html
- On a multi-core machine there is an additional opportunity to improve the actual performance of your compute bound operations, by bringing parallel programming into the picture.
- Another way of putting it is that on a single core you can use threads and you can have concurrency, but to achieve parallelism on a multi-core box you have to identify in your code the exploitable concurrency: the portions of your code that can truly run at the same time.
- http://www.sauria.com/blog/2009/10/06/concurrency-parallelism/
- parallel execution of a concurrent program
- http://blogs.sun.com/yuanlin/entry/concurrency_vs_parallelism_concurrent_programming
- concurrency: non-determinism (order of execution)
- Concurrency and parallelism are NOT the same thing. Two tasks T1 and T2 are concurrent if the order in which the two tasks are executed in time is not predetermined,
- If two concurrent threads are scheduled by the OS to run on one single-core non-SMT non-CMP processor, you may get concurrency but not parallelism. Parallelism is possible on multi-core, multi-processor or distributed systems.
- Concurrency is often referred to as a property of a program, and is a concept more general than parallelism.
- http://www.info.ucl.ac.be/~pvr/VanRoyChapter.pdf
- For example, a client/server application with two clients is nondeterministic since the server does not know from which client the next command will come.
- The client and server implementations can themselves be completely deterministic.
- Concurrency should not be confused with parallelism. Concurrency is a language concept and parallelism is a hardware concept. Two parts are parallel if they execute simultaneously on multiple processors. Concurrency and parallelism are orthogonal: it is possible to run concurrent programs on a single processor (using preemptive scheduling and time slices) and to run sequential programs on multiple processors (by parallelizing the calculations).
- Concurrent/Parallel Programming - The Next Generation by BillClementson?
Languages
Oz
Java
Introductions
Message Passing
Distributed Concurrency
The ErlangVM enables distributed concurrency, Closure on the JVM is optimizing for local concurrency.