[Tinyos Core WG] TOSThreads TEP
Janos Sallai
sallai at isis.vanderbilt.edu
Tue May 20 12:56:22 PDT 2008
Kevin,
This is great work, I can't wait seeing it. Please see my comments
below.
1. Readiness for static stack depth analysis
Regarding interrupts using the current thread stack: this kills static
stack depth analyzers, which would be really great to have in the
future. It is possible to accurately estimate the max stack depth for a
thread statically, and if we know the max stack depth, then we know how
much memory to allocate each thread's stack. This whole process could be
done at compile time using an integrated toolchain. However, if you
allow interrupts to use the per thread stacks, the max stack depth
depends on the interrupt load, which you can't tell in advance, thus you
end up overallocating memory. I think it is worth reconsidering this,
because using a separate stack for the interrupts (or interrupts+kernel)
could mean a tremendous memory gain.
2. Epilogue requirement
Is it absolutely necessary that an epilogue be specified for _all_
interrupt handlers? My guess is that the system would not break if you
allowed bursts of interrupts without the epilogues if it is guaranteed
that the burst is closely followed by an interrupt the handler of which
does have an epilogue. The reason why I am asking is that there are some
timing sensitive interrupt handlers in the rf230 stack, where the system
should not spend more than 100 clock cycles. By the way, can you tell
approximately how many cycles does the epilogue take?
3. Function pointers
You make use of function pointers pretty extensively. Is there a reason
why they couldn't be replaced with interface parameters? Parameterized
interfaces are in line with the TinyOS/nesC philosophy, and also,
getting rid of function pointers would make the job of analysis tools
much easier.
4. Misc comments
Section 3.3: AFAIK, on the atmega128, the stack grows from higher memory
locations to lower memory locations. Please correct me if I'm wrong.
Also, you have a couple of references to section 3.2, which, I guess,
should refer to section 4.2.
Janos
-----Original Message-----
From: tinyos-2.0wg-bounces at millennium.berkeley.edu
[mailto:tinyos-2.0wg-bounces at millennium.berkeley.edu] On Behalf Of Kevin
Klues
Sent: Tuesday, May 20, 2008 2:34 AM
To: TinyOS Core WG
Subject: [Tinyos Core WG] TOSThreads TEP
Attached.
--
~Kevin
More information about the Tinyos-2.0wg
mailing list