Concurrency Models tend to excite the passions. STM's are all the rage
these days, but recently the systems guys gave a one-two punch against
STM:
http://portal.acm.org/citation.cfm?id=1400228
(STM's are toys)
and
http://portal.acm.org/citation.cfm?id=1454462
(We've been writing composable, lock based systems for years-- they're
called operating systems!)
I'm a bit agnostic, but I also haven't done much traditional lock based
work (usually just enough to implement a channel, then back to CSP or
actors).
Can anyone recommend could resources on the classics (mutexes,
semaphores, monitors, etc)
Also, do I only have to worry about the memory-model/instruction-
reordering when using lock free primitives?
Thanks,
Matt
--
Go to a movie tonight. Darkness becomes you.
From: Paul Tarvydas
Subject: Re: OT:Lock based concurrency
Date:
Message-ID: <gf4m8u$92t$1@aioe.org>
Matthew D Swank wrote:
> Can anyone recommend could resources on the classics (mutexes,
> semaphores, monitors, etc)
Ric Holt's books (unbreak the lines):
http://www.amazon.com/Concurrent-Euclid-Addison-Wesley-computer-science/dp/0201106949/ref=sr_1_9?ie=UTF8&s=books&qid=1226169111&sr=8-9
http://www.amazon.com/Structured-Concurrent-Programming-Applications-Addison-Wesley/dp/0201029375/ref=sr_1_13?ie=UTF8&s=books&qid=1226169111&sr=8-13
pt
On Sat, 08 Nov 2008 13:37:19 -0500, Paul Tarvydas wrote:
> Matthew D Swank wrote:
>
>> Can anyone recommend could resources on the classics (mutexes,
>> semaphores, monitors, etc)
>
> Ric Holt's books (unbreak the lines):
>
> http://www.amazon.com/Concurrent-Euclid-Addison-Wesley-computer-science/
dp/0201106949/ref=sr_1_9?ie=UTF8&s=books&qid=1226169111&sr=8-9
>
> http://www.amazon.com/Structured-Concurrent-Programming-Applications-
Addison-Wesley/dp/0201029375/ref=sr_1_13?
ie=UTF8&s=books&qid=1226169111&sr=8-13
>
> pt
Thanks, I like cheap and used!
The first one, I assume, covers monitors and condition variables since
that's how Concurrent Euclid does synchronization. Does the second title
cover more primitive, well primitives?
Matt
--
After your lover has gone you will still have PEANUT BUTTER!
Matthew D Swank <··················@gmail.com> writes:
> Concurrency Models tend to excite the passions. STM's are all the rage
> these days, but recently the systems guys gave a one-two punch against
> STM:
>
> http://portal.acm.org/citation.cfm?id=1400228
> (STM's are toys)
>
> and
>
> http://portal.acm.org/citation.cfm?id=1454462
> (We've been writing composable, lock based systems for years-- they're
> called operating systems!)
Interesting. I'm curious about what the Clojure folks would say given
the fact that they seem pleased with their STM.
On Sun, 09 Nov 2008 13:50:28 -0500, Brian Adkins wrote:
> Matthew D Swank <··················@gmail.com> writes:
>
>> Concurrency Models tend to excite the passions. STM's are all the rage
>> these days, but recently the systems guys gave a one-two punch against
>> STM:
>>
...
>
> Interesting. I'm curious about what the Clojure folks would say given
> the fact that they seem pleased with their STM.
Well Clojure's real stab at maintainable concurrency is default
immutablity. The STM is meant to make correct, concurrent sharing
easier. If you have to share, transactions should be more maintainable.
I think the systems guys are skeptical that STMs can be efficient, and
that the semantics of transactions are unnecessarily complicated for the
problems they purport to solve.
I can't judge either way. I do think it is interesting that the
assumption of the second article, "Real-world Concurrency", is that the
goal of concurrency is performance. This seems to be a (understandably I
suppose) low-level point of view. However, some problem domains
encourage decomposition into concurrent computation units regardless of
the availability parallel execution.
Matt
--
You will overcome the attacks of jealous associates.
Matthew D Swank wrote:
> On Sun, 09 Nov 2008 13:50:28 -0500, Brian Adkins wrote:
>
>> Matthew D Swank <··················@gmail.com> writes:
>>
>>> Concurrency Models tend to excite the passions. STM's are all the rage
>>> these days, but recently the systems guys gave a one-two punch against
>>> STM:
>>>
> ...
>> Interesting. I'm curious about what the Clojure folks would say given
>> the fact that they seem pleased with their STM.
>
>
> Well Clojure's real stab at maintainable concurrency is default
> immutablity. The STM is meant to make correct, concurrent sharing
> easier. If you have to share, transactions should be more maintainable.
>
> I think the systems guys are skeptical that STMs can be efficient, and
> that the semantics of transactions are unnecessarily complicated for the
> problems they purport to solve.
I think it's too early to tell one way or the other. We may just be at a
stage as with garbage collection a couple of decades ago, when it was
deemed to be too expensive. Over time, better garbage collection
algorithms were found, and now it's common place.
The same could be true for STM in the long run. I think STM is very
promising...
Pascal
--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
Matthew D Swank wrote:
> I can't judge either way. I do think it is interesting that the
> assumption of the second article, "Real-world Concurrency", is that the
> goal of concurrency is performance. This seems to be a (understandably I
> suppose) low-level point of view. However, some problem domains
> encourage decomposition into concurrent computation units regardless of
> the availability parallel execution.
Improved latency is usually the motivation (even without parallelism, of
course). I'd put that under the performance bracket.
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u
Matthew D Swank wrote:
> Concurrency Models tend to excite the passions. STM's are all the rage
> these days, but recently the systems guys gave a one-two punch against
> STM:
>
> http://portal.acm.org/citation.cfm?id=1400228
> (STM's are toys)
>
> and
>
> http://portal.acm.org/citation.cfm?id=1454462
> (We've been writing composable, lock based systems for years-- they're
> called operating systems!)
AFAICT, STM addresses a very specific problem that I have never personally
encountered outside academic examples from the Haskell community.
> I'm a bit agnostic, but I also haven't done much traditional lock based
> work (usually just enough to implement a channel, then back to CSP or
> actors).
>
> Can anyone recommend could resources on the classics (mutexes,
> semaphores, monitors, etc)
I found this free Albahari e-book good:
http://www.albahari.com/threading/
> Also, do I only have to worry about the memory-model/instruction-
> reordering when using lock free primitives?
No, a lock implies fences so you just use a lock and you're fine.
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u
On Sun, 09 Nov 2008 20:18:23 +0100, Lars Rune Nøstdal wrote:
> On Sat, 2008-11-08 at 17:41 +0000, Matthew D Swank wrote:
>>
>> Can anyone recommend could resources on the classics (mutexes,
>> semaphores, monitors, etc)
>
> I think any generic tutorial (wikipedia, even) out there about these
> concepts will do in combination with whatever your Lisp-implementation
> provides.
How dare you try to put this thread back on topic!
Matt
--
How apt the poor are to be proud.
-- William Shakespeare, "Twelfth-Night"