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


Groups > comp.programming > #4043 > unrolled thread

Scalable RWLOCK 1.15

Started byaminer <aminer@toto.net>
First post2013-12-15 17:40 -0800
Last post2013-12-15 17:40 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.programming


Contents

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

#4043 — Scalable RWLOCK 1.15

Fromaminer <aminer@toto.net>
Date2013-12-15 17:40 -0800
SubjectScalable RWLOCK 1.15
Message-ID<l8lb3s$63k$1@news.albasani.net>
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.

[toc] | [standalone]


Back to top | Article view | comp.programming


csiph-web