## Lock-free Ringbuffer , lock-free flqueue , lock-free ParallelQueue and scalability...

### Lock-free Ringbuffer , lock-free flqueue , lock-free ParallelQueue and scalability...

Hello,

My new scalability mathematical model says that:

http://www.yqcomputer.com/



Speed(t,N,Sic,Soc) = 1 / (Sic * ((((1) * () / 2 )/ + (P / N))

Sic: serial part inside the critical region(locked regions)
Soc: serial part outside the critical region
P: parallel part
n: number of threads (or processes)
N: number of cores
C: contention factor in percentage,

C = average number of contended threads / n

and = C * n

And of course n (number of threads or processes) mus> be >= 2

So if you take a look at (benchmarks) graphs:

http://www.yqcomputer.com/

You will notice that my lock-free ParallelQueue is scaling better
than lockfree RingBuffer and flqueue, cause my lock-free
ParallelQueue
is lock-free and it's keeping the locked region very small, just
a CAS(longword(tail),longword(lasttail),longword(newtemp))
on the Pop() side , so it is reducing the Sic part in my
scalability...

And

Also i am using lock-striping in my lock-free algorithm , that
means that i am REDUCING the Sic part in my scalability equation
even more, but since the Sic is very small, but it still exists, my
scalability mathematical model predict that when n(number of threads)
will grow, = C * n will grow also, but since in equation  above
the
factor ((((1) * () / 2 )/ = ((1) * () / (2 * is growing
much faster
in the numerator ((1) * () than the denominator (2 * , that
means
that there will be a retrogade throuput when n (number of threads)
becomes much bigger, and this rectrograde throuput is reached
more quickly with lock-free flqueue and lock-free Ringbuffer than
with my lock-free Parallelqueue.

Welcome to my webpages:

http://www.yqcomputer.com/

and

http://www.yqcomputer.com/

Regards,
Amine Moulay Ramdane.
http://www.yqcomputer.com/