Hello........
I am a white arab, and i am a computer programmer and i have a diploma
in Microelectronics and informatics and i have also studied and
succeeded one year of mathematics at university level..
Please read this:
"Just as with normal thread pool usage, the main program thread may
create Tasks that will get queued on the global queue (e.g. Task1 and
Task2) and threads will grab those Tasks typically in a FIFO manner.
Where things diverge is that any new Tasks (e.g. Task3) created in the
context of the executing Task (e.g. Task2) end up on a local queue for
that thread pool thread."
Read more here:
http://www.danielmoth.com/Blog/New-And-Improved-CLR-4-Thread-Pool-Engine.aspx
You will notice that there is a contention on the global queue from
the producer threads and from the consumer threads on the Microsoft CLR
Threadpool engine, so that's not good.
But please look at the source code of my Threadpool engine that scales
well, it does eliminate the contention on the consumer threads side by
using technics such as lock-striping and other technics..
And my efficient threadpool that scales well supports the following:
- Now it can use processor groups on windows, so that it can use more
than 64 logical processors and it scales well.
The following have been added to my efficient Threadpool engine:
- The worker threads enters in a wait state when there is no job in the
concurrent FIFO queues - for more efficiency -
- You can distribute your jobs to the worker threads and call any method
with the threadpool's execute() method.
- It uses work-stealing to be more efficient.
- You can configure it to use stacks or FIFO queues , when you use
stacks it will be cache efficient.
- Now it can use processor groups on windows, so that it can use more
than 64 logical processors and it scales well.
- Now it distributes the jobs on multiple FIFO queues or stacks so that
it scales well.
- You can wait for the jobs to finish with the wait() method.
- It's NUMA-aware and NUMA efficient.
You can download it from:
https://sites.google.com/site/aminer68/an-efficient-threadpool-engine-that-scales-well
And you can download my efficient Threadpool engine with priorities
that scales well from:
https://sites.google.com/site/aminer68/an-efficient-threadpool-engine-with-priorities-that-scales-well
Thank you,
Amine Moulay Ramdane.