comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeff C," <nolongersafeto@userealemailsniff.com>
Subject: Re: How to calculate optimum task size?
Date: Sun, 04 Jan 2004 23:42:52 GMT
Date: 2004-01-04T23:42:52+00:00	[thread overview]
Message-ID: <0y1Kb.125953$VB2.391648@attbi_s51> (raw)
In-Reply-To: c9267c2d.0401041430.4aeefc2@posting.google.com

I have seen tools that claim to be able to compute worste case stack usage
(assuming no recursive calls) but I have
never been in a position to make use of them.
(Aonix has something called TSAT
http://www.acm.org/sigada/wg/asiswg/ASIS_Clients.html)


I usually try to make an initial sloppy estimate by doing a hand roll-up of
object sizes walking down a call tree (it
usually sounds scarier than it is for most tasks)..Then (for vxWorks) let
the system run for a while ...Especially if you
can present the system with "worste case" date. Then do a

checkStack

From the target shell.

It should show the the high water mark for stack usage for all tasks. I
usually (assuming I can afford the memory)
will then set default stack sizes 2x the high water level (unless it
conflicts with the hand estimate).

 Except for some special cases you sometimes have to avoid
(like aggregate assignment into a large structure on some compilers) most
tasks need very little stack size so
even the 2x value ends up using a very small ammount of the total memory.

"Baris Gokbudak" <bgokbudak@yahoo.com> wrote in message
news:c9267c2d.0401041430.4aeefc2@posting.google.com...
> Hi.
> At work we are using default sizes for tasks.But we have a memory size
> problem and as we are doing a real time system we should minimize the
> task sizes etc.But when we set a smaller size for a task we are not
> sure if it is the optimum size for that size.Is there any way to
> calculate the optimum task size for a task?We are compiling the
> project in Sparc 5 SUN.The real time system is used in VXWorks
> operating system.
> I am looking forward for any suggestion.





  parent reply	other threads:[~2004-01-04 23:42 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
2004-01-04 23:42 ` Jeff C, [this message]
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