From: aminer on

Skybuck wrote in alt.comp.lang.borland-delphi:

> My Thread Pool Engine is not just an array of threads,
> "
>
>> To me it is.


You really don't know what you are talking about..


The principal threat to scalability in concurrent applications
is the exclusive resource lock.

And there are three ways to reduce lock contention:

1- Reduce the duration for which locks are held

2- Reduce the frequency with which locks are requested

or

3- Replace exclusive locks with coordination mechanisms that
permit greater concurrency.


With low , moderate AND high contention, my ParallelQueue
offer better scalability - and i am using it inside my
Thread Pool Engine - .


Because my ParallelQueue is using an hash based method
- and lock striping - and using just a LockedInc() , so,
i am REDUCING the duration for which locks are held AND REDUCING
the frequency with which locks are requested, hence i am
REDUCING A LOT the contention, so it's very efficient.

And as I stated before , and this is a law or theorem to apply:

[3] If there is LESS contention THEN the algorithm will
scale better. Due to the fact that S (the serial part)
become smaller with less contention , and as N become bigger,
the result - the speed of the program/algorithm... - of the
Amdahl's equation 1/(S+(P/N)) become bigger.


It's why my ParallelQueue have scored 7 millions of pop()
transactions per second... better than flqueue and RingBuffer

look at: Http://pages.videotron.com/aminer/parallelqueue/parallelqueue.htm

Also my Threadpool uses efficent lock-free queues -
example lock-free ParallelQueue - for each worker thread
- to reduce an minimize the contention - and it uses work-stealing
so my Thread Pool Engine is very efficient...

And it easy the work for you - you can 'reuse' the TThreadPool
Class...- and it is very useful...


So, don't be stupid skybuck...


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


Sincerely
Amine Moulay Ramdane


From: aminer on

I wrote:
> Because my ParallelQueue is using an hash based method
> - and lock striping - and using just a LockedInc() , so,
> i am REDUCING the duration for which locks are held AND REDUCING
> the frequency with which locks are requested, hence i am
> REDUCING A LOT the contention, so it's very efficient.

With low , moderate AND high contention, my ParallelQueue
offers better scalability - and i am using it inside my
Thread Pool Engine - .

And as you have noticed, i am using a low to medium contention
on the following test:

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


But i predict that on HIGH tcontention the push() and pop() will
score even better than that..

Why ?

Because my ParallelQueue is using an hash based method
- and lock striping - and using just a LockedInc() , so,
i am REDUCING the duration for which locks are held AND REDUCING
the frequency with which locks are requested, hence i am
REDUCING A LOT the contention, so it's very efficient.


And as I stated before , and this is a law or theorem to apply:


[3] If there is LESS contention THEN the algorithm will
scale better. Due to the fact that S (the serial part)
become smaller with less contention , and as N become bigger,
the result - the speed of the program/algorithm... - of the
Amdahl's equation 1/(S+(P/N)) become bigger.



Sincerely,
Amine Moulay Ramdane,


From: Pascal Obry on
Le 03/04/2010 20:35, aminer a �crit :
>
> Skybuck wrote in alt.comp.lang.borland-delphi:
>
>> My Thread Pool Engine is not just an array of threads,
>> "
>>
>>> To me it is.
>
>
> You really don't know what you are talking about..

I do not know what you are talking about too. You keep responding to
messages that seems to not be sent on comp.lang.ada. And frankly, I
don't see any interest for us on comp.lang.ada to get those Pascal
oriented messages. Especially since you have never ever responded to a
message on this forum. At this point you are just spaming.

Pascal.

--

--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net - http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B

From: aminer on

Hello again,


Now as i have stated before:


[3] If there is LESS contention THEN the algorithm will
scale better. Due to the fact that S (the serial part)
become smaller with less contention , and as N become bigger,
the result - the speed of the program/algorithm... - of the
Amdahl's equation 1/(S+(P/N)) become bigger.


And , as you have noticed , i have followed this theorem [3] when
i have constructed my Thread Pool Engine etc...


Now there is another theorem that i can state like this:


[4] You have latency and bandwith , so, IF you use efficiently
one or both of them - latency and bandwidth - your algorithm
will be more efficient.


It is why you have to not start too many threads
- above the nnumber of cores that you have - in my
Thread Pool Engine, so that you will not context switch a lot,
cause, when you context switch a lot, the latency will grow and
this is not good for efficiency ..


You have to be smart.


And as i have stated before:


IF you follow and base your reasonning on those theorems
- or laws or true propositions or good patterns , like theorem [1] ,
[2], [3],[4] ... -
THEN your will construct a model that will be much more CORRECT
and EFFICIENT.


Take care...


Sincerely,
Amine Moulay Ramdane.


From: aminer on

Hello again,


Sorry for my english , but i will continu to explain - my ideas etc.
-
using logic and reasonning...


As you already know, we have those two notions:


'Time' - we have time cause there is movement of matter -


and


'Space'


And we have those two notions that we call 'Correctness' and
'Efficiency'


And . as you have noticed, i have stated the following theorems...


[1] IF your algorithm exhibit much more data parallelism THEN
it will be much more efficient.


2] IF two or more processes or threads use the same critical
sections THEN they - the processes or threads - must take
them in the same order to avoid deadlock - in the system - .


3] If there is LESS contention THEN the algorithm will
scale better. Due to the fact that S (the serial part)
become smaller with less contention , and as N become bigger,
the result - the speed of the program/algorithm... - of the
Amdahl's equation 1/(S+(P/N)) become bigger.


[4] You have latency and bandwidth , so, IF you use efficiently
one or both of them - latency and bandwidth - THEN your algorithm
will be more efficient.


etc.


Why am i calling them theorems ?


You can also call them rules or true propositions, laws ...


Now i can 'classify' theorem [2] in the set that i call
'correctness',
and it states something on correctness..


And theorems [1] [3] [4] in the set that i call 'efficiency'.


, and they states something on efficiency.


But you have to be smart now..


If you have noticed, theorem [2] and [3] are in fact
the same as theorem [4]


But why am i calling them theorems ?


You can call them rules,laws... if you want.


And as i have stated before:


IF you follow and base your reasonning on those theorems
- or laws or true propositions or good patterns - like rules or
theorems


[1] , [2] , [3], [4]... - THEN your will construct a model that will
be much more


CORRECT and EFFICIENT.


It is one of my preferred methodology in programming.


Sincerely,


Amine Moulay Ramdane.


First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: Java to Ada
Next: A good methodology ...