comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: How to calculate optimum task size?
Date: Sun, 04 Jan 2004 18:58:14 -0500
Date: 2004-01-04T18:58:14-05:00	[thread overview]
Message-ID: <juednUnFN_sKNWWiRVn-sQ@comcast.com> (raw)
In-Reply-To: <_W0Kb.1095$%L6.628@nwrdny01.gnilink.net>

Stephane Richard wrote:

> I'm not quite sure what you mean by Optimal task size.  if you're looking
> for the best size as far as speed is concerned, in my past I've found that
> giving tasks a size of 2^X somehow works faster.  hence 1024 instead 1000
> bytes for example.
> 
> If you're wondering if the task size influences what the task can handle as
> far as capacity goes I'll let the gurus here answer that part of it :-).

I could probably spend three years trying to answer that, and not cover 
all the important issues.

In safety-critical the usual approach is to have a fixed number of 
tasks, and for each of those tasks to have a call tree with no 
recursion.  Each call has should have fixed stack requirements.  That 
way you can compute the maximum possible stack size requirement for each 
task.  Of course, you also want to have a limit on heap allocations. 
Some organizations have rules that require no heap allocations. The 
rules I prefer allow explicit heap allocations, but only during 
initialization.

If you really need to solve this problem get some books on real-time and 
safety-critical programming, then choose a set of design tools that you 
will use to do the analysis.  (It is painful to keep track of the 
requirements as you make modifications, fix bugs, etc.)

Does all this double or triple the cost of the software?  Yes, welcome 
to the world of hard-real time and safety-critical software.  (What 
makes real-time software hard real-time?  The difficultly of meeting all 
the requirements. ;-)


-- 
                                           Robert I. Eachus

"The war on terror is a different kind of war, waged capture by capture, 
cell by cell, and victory by victory. Our security is assured by our 
perseverance and by our sure belief in the success of liberty." -- 
George W. Bush




  reply	other threads:[~2004-01-04 23:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-04 22:30 How to calculate optimum task size? Baris Gokbudak
2004-01-04 23:01 ` Stephane Richard
2004-01-04 23:58   ` Robert I. Eachus [this message]
2004-01-04 23:42 ` Jeff C,
2004-01-05  2:21   ` Ed Falis
replies disabled

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