qroach wrote on 10/15/08 at 13:30:34:I just pointed out that there is some critisism in the world out there, critisism of mutli-threading as opposed to true parallel computing. And there is nothing special one needs to know about it that.
See for examples:
http://www.concertant.com/Presentations/accu2008_themThreads.pdfOn the other hand, it makes sense to be aware of the critisism and its main points, think about it and be prepared to adopt other programming paradigms when the need arises (perhaps, never???)
Once one tosses away all the levels of abstraction, it is hard to not deal with threads. On the other hand, adding in levels of abstraction helps to remove the difficulty of multi-threaded programming.
The last slide of the pdf referenced in the link above makes the bold statement of "Always use message passing". But to where does one pass the message? To another process, of course, which happens to be running in a different thread, perhaps on the same machine, or a different machine.
So if one is dealing with a smaller number of messages per interval, abstractions like this work well. But when one is working with high frequency messages, say high frequency quotes and trades, one needs to work at a lower level abstraction in order to remain within certain compute and latency bounds. Working with a number of threads over a number of processors with some form of inter-thread message passing, seems to be the norm for improving performance.
Message passing is good, but how does one eliminate the threading element?
Having beat that dead horse, I have another one I'd like to beat. Regarding multi-paradigm programming, it follows that one should use the best tool for the job. Sometimes a multi-wrench works, sometimes a specialized one does better. Here is a link supporting the multi-wrench concept:
http://bridgewater.wordpress.com/2006/10/03/c-is-a-multi-paradigm-language-item-...