Alex Rivera | Logout

List of concurrency models

Asked 2010-11-11T09:50:56.647
40

I'd like a large list so I can reference this for ideas. Some answers already have been enlightening .

What are some concurrency models? I heard of message passing where there is no memory shared. Futures which returns an object right away (so it doesn't block) and allows you to dereference the original function returns value later when you need it blocking if the results are not ready yet. I heard of coroutines, software transactional memory and random others.

I searched for a list or a wiki and couldn't find any good ones (many did not list the 3 I mentioned above) and many results gave me a complicated description explaining how it works rather then what it does or how it is to be used.

What are some concurrency models and what is a simple description of what they do? One per answer.

Edit
Report

2 Answers

7

Futures

A future is a place-holder for the undetermined result of a (concurrent) computation. Once the computation delivers a result, the associated future is eliminated by globally replacing it with the result value. That value may be a future on its own.

Whenever a future is requested by a concurrent computation, i.e. it tries to access its value, that computation automatically synchronizes on the future by blocking until it becomes determined or failed.

There are four kinds of futures:

  • concurrent futures stand for the result of a concurrent computation,
  • lazy futures stand for the result of a computation that is only performed on request,
  • promised futures stand for a value that is promised to be delivered later by explicit means,
  • failed futures represent the result of a computation that terminated with an exception.
answered 2010-11-12T21:24:22.093
1

Parallel Random Access Machine (PRAM) is useful for complexity/tractability isues (please refer to a nice book for details).

About models you will also find something here (by Blaise Barney)

answered 2010-11-23T09:19:50.030

Your Answer