comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Tasks unleashed
Date: Fri, 02 May 2003 23:52:09 GMT
Date: 2003-05-02T23:52:09+00:00	[thread overview]
Message-ID: <JwDsa.709875$L1.202740@sccrnsc02> (raw)
In-Reply-To: MPG.191c7316c64d7b29896f3@News.CIS.DFN.DE

> >   Have you considered a protected Buffer of work to do and a fixed pool of
> > tasks which queue on an entry waiting for the Buffer to have some work to
> > ...
> That's exactly what I'm doing :) but sometimes the "fixed" compromise
> bugs me. ITOH, normally is better to have a upper bound for things, I
> think.

  You could make a hybrid.  An array of (initially null) pointers to
tasks, and, if Buffers can't service a client in a reasonable length of
time, you start up a "new" task.  Then your fixed limit is buffer'length +
task_array'length, but if the program actually only needs a few tasks, or
is sufficiently patient, you will only start up a small number of tasks.
Of course if your program desperately needs a large number of tasks early
in execution, but not later, you'll have to depend on virtual memory to
move those, now superfluous, tasks out of RAM.  If the program really has
phases like that, perhaps it should be split into two programs to be run
sequentially.



  reply	other threads:[~2003-05-02 23:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-01 14:01 Tasks unleashed Jano
2003-05-01 15:40 ` Stephen Leake
2003-05-01 16:14 ` Robert A Duff
2003-05-01 16:30   ` Jano
2003-05-02  1:14 ` tmoran
2003-05-02 11:21   ` Jano
2003-05-02 23:52     ` tmoran [this message]
2003-05-11  5:35     ` Craig Carey
2003-05-11 15:35       ` Pascal Obry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox