Hello,
Scalable RWLock version 3.02 is here...
I have thought more about my previous LW_RWLockX algorithm, and
this algorithm had a bug in it, so i had to reinvent a new algorithm
that uses my new lightweight EventCount, this new LW_RWLockX algorithm is scaling very well, and it's starvation-free and it's portable,
when there is many more writers it will be starvation-free, and this
is good, hope you will take a look at my new algorithm inside the
zip file, i have tested this new algorithm extensivly and i can
tell you that it's stable now.
You will find three variants of my scalable RWLock, one called
LW_RWLock that is not starvation-free but it's scalable and portable and another one called LW_RWLockX that is starvation-free and that is scalable and portable, there is also another one that is called RWLock that uses less CPU ressources but it's not starvation-free and it's
scalable and portable.
A Read/Write Lock is a performance improvement over a standard mutex for cases where reads outnumber writes. with a Read/Write Lock multiple simultaneous read locks may be held, but write locks are exclusively held.
The exclusive writing lock ensures that race conditions do not occur, since if one client is writing to the data no other client may read or write. Also, the allowance for multiple simultaneous read locks decreases resource contention since multiple readers can safely use the shared data. This increases performance over a standard mutex for the assumed usage pattern of frequent simultaneous reads and infrequent writes.
You can download my new scalable RWLock version 3.02 from:
http://pages.videotron.com/aminer/Thank you,
Amine Moulay Ramdane.