[M3devel] lock performance, random thoughts

Chris Highjinks at gmx.com
Wed Apr 7 22:09:27 CEST 2010


As I've said before, this really has NOTHING to do with user/kernel level threading. It's all about synchronization. The only thing a user level thread offers is the possibility to completely avoid context switches, such as is common in a State Machine/Automata. You could also approach it as a Direct Threaded environment, as is common in many Forth implementations.

Look at pthreads read and write barriers. Look at http://www-sop.inria.fr/meije/rp/LOFT/
This is a tool which comfortably integrates both Kernel Space and User Space threads into a whole.

In general the Synchronous Model(typically implemented as user space threads, due to lack of Kernel support) will typically be much faster when doing interactive and multimedia programming. The Asynchronous model(typically done as Kernel Space threads) will usually be faster at Batch processing.

You can do both with Posix Threads. No need to limit the environment exclusively to one or the other. A mixed model provides the best flexibility.

       


-- 
Chris <Highjinks at gmx.com>



More information about the M3devel mailing list