[Tinyos Core WG] Meeting: 7/11/07
John Regehr
regehr at cs.utah.edu
Wed Jul 11 12:58:53 PDT 2007
> PL: Large atomic sections perhaps?
I wrote a bit of code for Avrora (UCLA simulator) that makes a histogram of
cycles spent in each atomic section. Anyone wants this, let me know. Scanning
these results may be a reasonable part of regression testing. For example this
is from RadioCountToLeds from current CVS with the histogram aggregated over all
atomics over a 30 seconds run:
bucket 00 (0000-0099) : 6132
bucket 01 (0100-0199) : 135363
bucket 02 (0200-0299) : 1177
bucket 03 (0300-0399) : 2359
bucket 04 (0400-0499) : 158
bucket 05 (0500-0599) : 4
bucket 06 (0600-0699) : 37
bucket 07 (0700-0799) : 0
bucket 08 (0800-0899) : 0
bucket 09 (0900-0999) : 0
bucket 10 (1000-1099) : 0
bucket 11 (1100-1199) : 0
bucket 12 (1200-1299) : 0
bucket 13 (1300-1399) : 118
bucket 14 (1400-1499) : 0
bucket 15 (1500-1599) : 0
bucket 16 (1600-1699) : 0
bucket 17 (1700-1799) : 1
bucket 18 (1800-1899) : 118
bucket 19 (1900-1999) : 0
bucket 20 (2000-2099) : 0
bucket 21 (2100-2199) : 0
bucket 22 (2200-2299) : 0
bucket 23 (2300-2399) : 0
bucket 24 (2400-2499) : 0
bucket 25 (2500-2599) : 0
bucket 26 (2600-2699) : 0
bucket 27 (2700-2799) : 0
bucket 28 (2800-2899) : 0
bucket 29 (2900-2999) : 118
(Nothing in any larger bucket.)
A problem is that Avrora only gives results for Mica2. I will just repeat my
plea for a cycle accurate simulator for all major platforms.
The question "How long is too long for an atomic?" is harder in general, though
easy for the case of a serial port that interrupts on every byte. For example
at 115 kbps we might expect problems if there are too many atomics longer than
~500 cycles.
> DG: Tasks assume they are never interrupted -- they don't protect busy
> flags with
> atomic for example.
Conservative detection of variables shared across tasks is something we can do
very easily. This would seem to be useful if anyone wants to threadify.
John Regehr
More information about the Tinyos-2.0wg
mailing list