Linked by Hadrien Grasland on Fri 27th May 2011 11:34 UTC
General Development After having an interesting discussion with Brendan on the topic of deadlocks in threaded and asynchronous event handling systems (see the comments on this blog post), I just had something to ask to the developers on OSnews: could you live without blocking API calls? Could you work with APIs where lengthy tasks like writing to a file, sending a signal, doing network I/O, etc is done in a nonblocking fashion, with only callbacks as a mechanism to return results and notify your software when an operation is done?
Permalink for comment 474941
To read all comments associated with this story, please click here.
RE: Mutex-less computing
by Alfman on Sun 29th May 2011 17:54 UTC in reply to "Mutex-less computing"
Alfman
Member since:
2011-01-28

xiaokj,

"There are actually alternatives to just plain old threaded / async / semi-async (you defined threaded + threshold == semi-async). Non-blocking algorithms exist of a more radical type. I have read that there are people who have successfully implemented system-level stuff using unconventional non-blocking mechanisms, most notably compare-and-swap"

I don't know why you call these unconventional, atomics are pretty common for implementing thread safe algorithms which don't require OS level synchronization. Many compilers (GCC) have support for them.

It's an extremely fine grained serialization (at the system bus level). I use them often in MT code, however they're still expensive since they cannot run at CPU speeds.

I'm not disagreeing with your post, however I'd like to add that atomic cpu operations are only necessary in MT code, an async or other single threaded model doesn't need to sync because the possibility for overlap with other threads doesn't exist in the first place.

Reply Parent Score: 2