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


Groups > comp.programming.threads > #2659

The standard deviation of the throughput of the scalable Locks...

From Ramine <ramine@1.1>
Newsgroups comp.programming.threads
Subject The standard deviation of the throughput of the scalable Locks...
Date 2014-11-02 10:34 -0800
Organization A noiseless patient Spider
Message-ID <m35isa$lia$1@dont-email.me> (permalink)

Show all headers | View raw


Hello,


What i have done correctly is that i have lowered the
standard deviation of the throughtput of my scalable MLock
(it is a scalable lock)... what do i mean by that ?
you have to be careful when you are using Ticket spinlock
with a proportional backoff , cause when there is many more threads
contending for the Lock, the threads that didn't yet received
there ticket to enter and that are scheduled to run , will use all
there quantum time(time slice), so they will slow the throughput by much 
and they will genrate a bigger standard deviation on there 
thoughtput..so what you have to do is use for example a windows sleep(0) 
after the proportional backoff to give up the time slice as soon as 
possible and this will lower by much the standard deviation of the 
thoughput of the Ticket spinlock with a propotional backoff... i have 
used the same technic for my scalable MLock and it is giving a much 
smaller standard deviation for its throughput...and this has solved the 
same problem on my SemaMonitor and SemaCondvar , using my technic 
allowed the standard deviation of there throughput to be lowered a 
lot... so you have to be smart please and make sure you avoid those 
problems...


Here is the source code that i am using to lower the standard deviation 
of the throughput of my scalable MLock, and it is working
perfectly...

--

inc(k);
if (k mod 140)=0
then
{$IFDEF FPC}
ThreadSwitch;
{$ENDIF}
{$IFDEF Delphi}
sleep(0);
{$ENDIF}

-




Thank you,
Amine Moulay Ramdane.








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


Thread

The standard deviation of the throughput of the scalable Locks... Ramine <ramine@1.1> - 2014-11-02 10:34 -0800

csiph-web