[Tinyos Core WG] TOSThreads TEP

Martin Turon mturon at xbow.com
Tue May 20 16:25:03 PDT 2008


Hi Kevin,

Are these threads like typical ones in that memory can be shared across
them?

Or are they more like "green processes" in Erlang in that each one
controls its own variables and need not worry about race conditions and
deadlock from external access?

The later has proven to allow for high levels of concurrency and greatly
simplified programming models.  

Martin 

__________________________________________________
Martin Turon  |  Crossbow Technology, Inc.


-----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 4:19 PM
To: Miklos Maroti
Cc: TinyOS Core WG
Subject: Re: [Tinyos Core WG] TOSThreads TEP

Again, the motivation behind the dynamic threads was for emabling
dynamically loadable binaries at runtime.  This way you can have a
mote sitting out in the field with a 'kernel' on it, and you can ship
it a thread based binary that it can link and load at runtime.

kevin

On Tue, May 20, 2008 at 4:15 PM, Miklos Maroti
<mmaroti at math.u-szeged.hu> wrote:
>> Of course, function pointers wouldn't be necessary if we
>> supported only Static threads (using terminology borrowed from the
>> TEP), to allow flexibility in the definition and use of dynamic
>> threads, function pointers are necessary.
>
> To be frank, I would not allow dynamic threads at all because of the
> following simple reasons:
>
> - Why would threads be any different from memory allocation, we have
> static memory allocation, static composition, etc.
>
> - You cannot do whole application analysis (included WC stack usage)
> if you have dynamic threads.
>
> - Janos Sallai has a tool (documented in his thesis) that can compile
> away static threads into normal tinyos event driven code. Keeping the
> threads static allows other people to implement threading in a
> completely different way: competition is good (TM).
>
> Miklos
>



-- 
~Kevin
_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0w
g



More information about the Tinyos-2.0wg mailing list