Furthermore, today starting a thread is an enourmous performance penalty, because all non shared data is copied. Unlike forking, where we have copy-on-write (for the curious- it's very efficient, because the kernel simply marks all memory pages as readonly, causing write operations to raise an exception from the MMU, to which the kernel responds to making a new copy of the page which the writing process can work on), there is no optimisation of the process. The main advantage I'm looking for in threads is to gain performance due to concurrency on SMP platforms, for small tasks. Starting a thread needs to be cheap for this to be effective. I think a tradeoff of some continuous speed penalty for an efficient startup time, should at least be a choice.
I'll go looking for some reading material, but I'm sick and too tired to concentrate for any reasonable length of time, so I doubt I can introduce any worthwhile discussion to this thread.
In reply to Re^2: TIMTOWTDI vs. ithreads
by nothingmuch
in thread TIMTOWTDI vs. ithreads
by nothingmuch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |