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


Groups > comp.programming.threads > #2026

Scalable RWLOCK 1.15

From aminer <aminer@toto.net>
Newsgroups comp.programming.threads, comp.programming
Subject Scalable RWLOCK 1.15
Date 2013-12-15 17:40 -0800
Organization albasani.net
Message-ID <l8lb3s$63k$1@news.albasani.net> (permalink)

Cross-posted to 2 groups.

Show all headers | View raw


Hello,

I have updated my scalable RWLOCK to version 1.15, i have
used the scalable Anderson lock in the write side so
that it becomes FIFO fair and so that it reduces the
cache-coherence traffic efficiently.


Scalable RWLock 1.15


Authors: Amine Moulay Ramdane.


Description:

Description:  A fast,  and scalable, and lightweight 
Multiple-Readers-Exclusive-Writer Lock that is portable called LW_RWLock 
and that works across processes and threads and a fast  and also a 
scalable Multiple-Readers-Exclusive-Writer Lock that is portable called 
RWLock and that don't use spin wait but uses an event object and also my 
SemaMonitor and that consumes less CPU than the lightweight version and 
it processes now the writers on a FIFO order and that's also important 
and it works across threads .

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 Scalable RWLock from:

http://pages.videotron.com/aminer/

Please take a look a the test.pas Object Pascal demo inside the zipfile, 
compile and run it...

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

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


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

-Sd for delphi mode....

{$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


Thread

Scalable RWLOCK 1.15 aminer <aminer@toto.net> - 2013-12-15 17:40 -0800

csiph-web