[fpc-devel] LockFree Queue algorithm
Michael Schnell
mschnell at lumino.de
Tue Jan 29 12:02:28 CET 2008
> FUTEX is based on atomic operation, the same as I used.
> but with lockfree algorithms You don't protect access at all.
I understand this, but I'm nut sure that this really is advantageous.
Any atomic operation in a multicore system with a cache for each core
imposes a delay for cache synchronization. Thus as little as possible
"lock" operations should be issued. 99,99% of the calls will not see
another processor or thread concurrently working on the FiFo data.
The implementation similar to Futex in the no blocked case needs one
lock operation on entry and one on exit. Thus using a thing similar to
FUTEX needs some 2,0001 locked operations per call.
An implementation with a single lock operation per call - if possible -
would be better, of course.
-Michael
More information about the fpc-devel
mailing list