Four Reasons Why Parallel Programs Should Have Serial Semantics
cilk.com
cilk.com
well, there was this joke about a dog, an octopus, and wooden legs.
But most software programs can accept a little nondeterminism. Object-oriented design (at least, GOOD design) is built around the fact that your object's methods might be called at any time; you're just providing an interface. So (this was a programming language idea I was working on for a while) why don't we make it work that way? Make all method calls asynchronous, make methods transactions upon objects, and just schedule as many method calls in parallel as you can get your hands on. Good for server design, potentially good for parallelizing existing code (you'd still have to go through it and make sure it made sense -- no reaching into other people's objects and tweaking their internal state, etc.)
I guess my point is that while serial equivalence is a strong property, it's not necessary for many programs, and it completely prevents the existence of some, especially server-type programs.
The alternative would be to explicitly specify which paths are allowable, rather than allow them all and then forbid which isn't.
I don't know how that would work, I don't remember who said it. Still, it feels good.
Unfortunately, I've recently read that STM is turning out to have too much overhead in practical applications. Hope they figure it out.
The fact that there wasn't one leads me to believe that they are susceptible to the same problems and have no hope of getting around it in the future, though; I suspect if that wasn't true, dons would have been all over the comments on proggit, and he was silent. It's thin logic, admittedly, but...
I would be interested in the "too much overhead" article -- can you track it down? I've been researching STM for a while and seen a lot of papers focused on performance and such, so I'd be surprised if whatever the article claims are the problems are not fixable in the long term.
(STM can be nearly reduced to "taking locks", especially if you are compiling, so it really shouldn't be worse than lock-based synchronization, and it's much easier to reason about.)
The issue is that STMs have a lot of book-keeping overhead in addition to the locking.