SDTimes has two opinion pieces this month on threading - both talking about a "thread maturity model", which tracks a programmers progress up the slopes of thread-ability. First, the opinion piece by Alan Zeichick - he seems to think it's all about training - here's his "level 5":
Adoption. All developers trained to use threading. Threading is addressed at the design, requirements and architectural states of development, in addition to coding and testing. Broad incorporation of threading tools into the toolchain. Newly adopted code, such as libraries and components, must demonstrate support for threading. Funded efforts to eliminate all nonthreaded libraries and runtimes. All threaded applications are tested against platforms with different cores/processors to identify runtime issues. Formal source-code validation techniques are used to identify potential failures.
Unless your runtime system was written to deal seamlessly with these issues, you'll never get there - period. The major issue, properly identified by the Erlang folks, is sharing. In Erlang, threads use a "shared nothing" model to ensure that you don't get deadlocks. Using Smalltalk, or Java, or C#, the way to do the same thing is to run N processes, and have them interoperate via heavyweight messaging. Larry O'Brien touches on that at the end of his piece:
Today, those who have achieved the “Optimizing” level of parallel programming mastery are vanishingly rare. During the days, they are locked deep inside telecom buildings, research facilities and hardware companies.
Erlang came out of telecom research - we had an interesting talk on it at last year's StS conference. A side note on all this - last week's podcast covered this ground. And see Runar's post on scaling via multiple images.
Technorati Tags:
threads, processes