Hello.
This is an enhanced version of my previous locking suggestion.
* The previous one had the unfortunate effect that the delay in the
spinlock ate up almost all the predicted reduction in response times.
This has been fixed.
* This version is starvation free, which should ensure that "maximum
response time" stays low in the benchmarks.
* This version uses file locking instead of mysql, which makes it much
more efficient. This also makes it completely independent from the rest
of the wikipedia code.
If this approach is deemed feasible, I think this version of the locking
is acceptable for a production server. Another enhancement could be to
use SysV semaphores instead, but support for them has to be compiled
into PHP and they bring their own set of problems. Also, performance is
not a problem with the current solution, so there's little need to move
to SysV semaphores.
/E23