Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #3897

My new algorithms of Scalable RWLocks using scalable counting networks version 4.1 are here

From Intelli2 <intelli2@mama.com>
Newsgroups comp.programming.threads
Subject My new algorithms of Scalable RWLocks using scalable counting networks version 4.1 are here
Date 2017-10-17 20:49 -0400
Organization A noiseless patient Spider
Message-ID <os5qd8$ads$2@dont-email.me> (permalink)

Show all headers | View raw


Hello,

My new algorithms of Scalable RWLocks using scalable counting networks 
version 4.1 are here, i have provided you with the Windows and the Linux 
versions.

You can download them from:

https://sites.google.com/site/aminer68/scalable-rwlock-using-scalable-counting-networks

Authors: Amine Moulay Ramdane.

Description:

I have ported the scalable counting network algorithm to Delphi and 
FreePascal, and i have used it inside my following Scalable RWLOCKs 
using scalable counting networks , here is the papers of the scalable 
counting network algorithm:

http://people.csail.mit.edu/shanir/publications/AHS.pdf

and also read the following (the counting network is truly scalable, 
please look at the graph inside the paper):

http://people.csail.mit.edu/shanir/publications/HLS.pdf

Counting networks are truly scalable and are a special type of balancer 
networks which count.

I have provided with the following Scalable RWLOCKs using scalable 
counting networks:

A fast, and scalable and lightweight Multiple-Readers Exclusive-Writer 
Lock that is portable called LW_RWLock and a fast, and scalable and 
starvation-free and lightweight Multiple-Readers-Exclusive-Writer Lock 
that is portable called LW_RWLockX and that is FIFO fair on the writer 
side and FIFO fair on the reader side and that is of course 
Starvation-free, and also a fast a scalable 
Multiple-Readers-Exclusive-Writer Lock that is portable called RWLock 
and that doesn't spin-wait but uses my SemaMonitor so it is energy 
efficient and also a fast and scalable and lightweight 
Multiple-Readers-Exclusive-Writer Lock that is portable called RWLockX, 
this one is FIFO fair on the writer side and FIFO fair on the reader 
side and of course it is starvation-free and it doesn't spin-wait but 
uses my portable SemaMonitor and portable event objects , so it is 
energy efficient.

As you have noticed i have invented 4 variants of my scalable RWLock, 
the ones that ends with an X in there names are FIFO fair on the writer 
side and FIFO fair on the reader side and they are of course 
starvation-free and they are suitable for reatime critical systems, the 
others are not.

Why have i decided to come with scalable and starvation-free RWLocks, 
cause you can have frequent reads and infrequent writes but from time to 
time you can have frequent writes, so i think it is important to have a 
scalable and starvation-free RWLock , this is why i have come up with 
two variants of scalable and starvation-free RWLocks.

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.

Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

Operating Systems: Windows, Mac OSX , Linux...

Required FPC switches: -O3 -Sd -dFPC -dFreePascal

-Sd for delphi mode....

Required Delphi switches: -DMSWINDOWS -$H+ -DDelphi

{$DEFINE CPU32} and {$DEFINE Windows32} for 32 bit systems

{$DEFINE CPU64} and {$DEFINE Windows64} for 64 bit systems

Thank you,
Amine Moulay Ramdane.

Back to comp.programming.threads | Previous | Next | Find similar | Unroll thread


Thread

My new algorithms of Scalable RWLocks using scalable counting networks version 4.1 are here Intelli2 <intelli2@mama.com> - 2017-10-17 20:49 -0400

csiph-web