From: Dennis Lee Bieber <wlfraed@ix.netcom.com>
Subject: Re: dynamic vs static tasks allocation
Date: Thu, 16 Oct 2014 20:07:35 -0400
Date: 2014-10-16T20:07:35-04:00 [thread overview]
Message-ID: <rpm04a10q18or10rp5obn78mahi49u44ho@4ax.com> (raw)
In-Reply-To: a4e161b4-f966-4c40-80b9-6dfe760815da@googlegroups.com
On Thu, 16 Oct 2014 10:25:50 -0700 (PDT), Stribor40 <ikamzic@gmail.com>
declaimed the following:
>If you know ahead of time how many tasks will be needed is it better to create tasks dynamically with new operator or just statically?
>
>Which is way is recommended and why even bother allocating dynamically?
Avionics stuff creates all processes (and memory structures) during
initialization -- the only reason for dynamic task creation would be if the
/number of specific tasks/ is determined from a startup configuration file
-- otherwise they are essentially statically determined.
But for something like a simulation -> simplistic example: say animal
interaction -- creating a dynamic task each time an animal is "born" might
be a scheme (though such are likely more easily run using a before/after
array of the critters in a loop -- not to mention having to "teach" the new
one about the rest of the pack).
Knowing how many are needed (without a configuration file) seems, to
me, to imply declaring a fixed array of them at compile time.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
prev parent reply other threads:[~2014-10-17 0:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 17:25 dynamic vs static tasks allocation Stribor40
2014-10-16 18:18 ` mockturtle
2014-10-16 18:41 ` Adam Beneschan
2014-10-16 18:45 ` Jeffrey Carter
2014-10-17 0:07 ` Dennis Lee Bieber [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox