Multi-threaded Programming Makes You Crazy?
gduranceau writes "Help! My program deadlocks! I got several concurrent threads that write the same variable! Everything goes well on my mono processor but becomes an incredible mess on that 16 CPU monster! And of course, as soon as I add traces, problems disappear... Don't panic! Calm down and take a deep breath. "
Oh wait. I was supposed to praise the NPTL tool, wasn't I. Um... well... it's very nice. And they've got... um... penguins on the homepage. Oh, and look! It's GPLed! Wow. Just... um... wow. Hey, did you know that the author of Minix wrote a book on OS Design? Really. It even covers the basics of multi-threading. It's pretty cool, you should... um... check it out. Yeah, that's the ticket!
Javascript + Nintendo DSi = DSiCade
Looking at the list of functions that it hooks into, I don't see pthread_rwlock*. Are the pthread_rwlock functions implemented using other pthread_* funcs? I haven't run into any problems yet with the project I'm working on, but it would be nice to run through this and make sure everything's working as expected.
<xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
Realized that link wasn't as helpful as I remembered. But here are some other good general links that should get you going.
p df
http://en.wikipedia.org/wiki/Concurrent_computing
http://en.wikipedia.org/wiki/Message_passing
http://en.wikipedia.org/wiki/Actor_model
The E lang has some good documentation on concurrency, even if you don't use it.
http://www.erights.org/elib/concurrency/
As does Erlang.
http://www.erlang.org/download/erlang-book-part1.
"It is better to die on one's feet than to live on one's knees." - Albert Camus
Slashdot reported the summary line thusly:
Developers: Multi-threaded Programming Makes You Crazy? 79 of 78 comments
What's wrong with this picture?
None of these things are given; there's no such thing as "the concept." The designer of the language decides what guarantees to give the programmer and what latitude to give to the compiler, as well as what structures are provided to manage concurrency. Essentially, the language designer decides what concepts the users of the language must understand and employ. C and C++ expose the programmer to the full complexity of machine behavior because efficiency has always been their overriding concern, and in any case, those decisions were made at a time when threading was a niche concern. Newer languages typically strike a different balance between efficiency and support for concurrency.