Re: MultiThreaded framework again
- From: "Cristian Nicola" <n_cristian@xxxxxxxxxxx>
- Date: Fri, 18 Nov 2005 13:32:57 -0000
I have only read first part (thread manager) and will go over the rest bit
later as i'm very busy at the moment.
A possible suggestion which may prove to be useful:
- when creating the threads for priority use 3 values for number of threads
:
- minThreads - this is how many threads are created right away
- maxThreads - this the how many threads may be created at some point if
extra work is needed
- graceThreads - this is how many "extra" threads could be created if
needed.
The functionality is as such:
- at startup there would be minThreads created.
- as the "sytem" load increases it may be possible that work needs to be
done, but there are no free threads available. The manager then can create a
new one.
- at some point the system would run maxThreads and it may need to create a
new thread - if graceThreads allows it, it would create anymore threads up
to the grace value
- when the system reaches the grace value it blocks till a worker is
available
- when a worker finishes his work and the workers count is in maxThreads ..
graceThreads, instead of returning to the pool it is going to free itself.
Possible extension would be to free threads between min and max if no work
is done for a long time.
I think this would allow the system scale well under load, while allowing
the programmer to have a very fine tunning on the threads numbers....
Comments?
Cristian Nicola
"Martin James" <mjames_falcon@xxxxxxxxxxxxxx> wrote in message
news:437dd056@xxxxxxxxxxxxxxxxxxxxxxxxx
> After some experimentation with QuickSort and MergeSort, (thanks Anders),
I
> have a sorta proposal for an interface for running FastCode, or bits of
it.,
> on multiple processors - the 'thead manager' as suggested/discussed by
Eric,
> Crisitian, Avatar and A Programmer.
.
- Follow-Ups:
- Re: MultiThreaded framework again
- From: Martin James
- Re: MultiThreaded framework again
- References:
- MultiThreaded framework again
- From: Martin James
- MultiThreaded framework again
- Prev by Date: MultiThreaded framework again
- Next by Date: Re: quick question
- Previous by thread: MultiThreaded framework again
- Next by thread: Re: MultiThreaded framework again
- Index(es):
Relevant Pages
|