Re: More Trouble with Programming
Posted: Dec 13, 2006 8:23 AM
> > We have no choice but to come up with a
> > simpler, more intuitive way to do multithreaded
> > programming that regular programmers can use
> > successfully.
> Have you ever wondered why humans can do such things as
> memory management and thread synchronization while
> computers can not?
> This is an important question that, strangely, no one
> asks. From the greatest mathematicians of our time, like
> Wadler, to language creators like Stroustrup or yourself,
> to the lowly programmers like me and my buddies at work,
> no one have asked this simple question.
Phil Wadler? If yes, Phil is a great guy, but he is not that class of mathematician.
But yes, *many* people have asked that question in many ways. In fact, my PhD thesis was on the management of concurrency.
There is an absolutely daunting literature on the subject, but "real world users" has so far not cared and muddled along with threads.
> It would be interesting to see how everybody deals with
> the problems like memory management and thread
> synchronization. Perhaps we can pinpoint the appropriate
> abstractions and understand that problems like thread
> synchronization are solvable.
Letting lots of threads loose in a shared address space is fundamentally a bad idea. It forces users to deside where synchronization is needed and to choose which kind of synchronization is appropriate. Separating concurrent activities so that they communicate only through explicitly declared channels is key to most good solutions. I like the ideas of futures (for individual concurrent activities) and message queues (for long-running activities).
-- Bjarne Stroustrup; http://www.research.att.com/~bs