Re: MultiThreaded framework again



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.


.



Relevant Pages

  • Re: How to determine if task is busy or not?
    ... In other words, if the "manager" ... asks the task whether it is busy or idle and the answer is "idle", ... This is what the job queue is for. ... monitor task (a special "mister no" worker). ...
    (comp.lang.ada)
  • Re: SBS 2003 Premium R2 server becomes more unstable, page file gr
    ... However, at the server, it is ... high CPU usage. ... the Task Manager, we see the 9.29 GB. ... according to MS specs and your suggestion of the PF being 1.5x the RAM, ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS 2003 Premium R2 server becomes more unstable, page file gr
    ... Switch to a system managed pagefile, as a suggestion. ... I'm hoping that this is true and that as we've applied hotfixes that we've ... the Task Manager, we see the 9.29 GB. ... according to MS specs and your suggestion of the PF being 1.5x the RAM, ...
    (microsoft.public.windows.server.sbs)
  • Re: Start service automatically
    ... you can try his suggestion first. ... A group policy modifying the Startup Type of the Remote Desktop Help ... "Remote Access Auto Connection Manager" ... booted to Safe Mode with command prompt and ran the following command - ...
    (microsoft.public.windows.group_policy)
  • Re: pthread_cond_signal - race condition
    ... >> I am working on a designing a Thread Manager to run n number of ... >> The Manager runs continuously and runs next n number of Worker ...
    (comp.programming.threads)