[Tinyos-devel] issue with ResourceRequested

Philip Levis pal at cs.stanford.edu
Fri Aug 8 23:18:43 PDT 2008


On Aug 8, 2008, at 10:15 PM, Eric Decker wrote:

> I think I've found a problem with the structure of arbitration and  
> ResourceRequested.
>
> The purpose of ResourceRequested is to allow an owning resource  
> user to be informed
> that other users have requested the resource so that the owner can  
> release it.
>
> There appears to be a start up condition that presents a problem.   
> Consider
> three users of the resource, A, B, and C.
>
> A wants to use the resource, R, but wants to release if B or C  
> request.  A will release
> and immediately re-request.  That's the plan anyway.
>
> Consider, A requests the resource but it hasn't been granted yet.   
> While A's grant is
> pending, B and C request.  Then the granting task gives A the  
> resource.  But there
> currently isn't anyway for A to know that there are outstanding  
> requests and because
> the requests for B and C came in prior to A actually owning the  
> resource the
> ResourceRequested signal wasn't signaled.
>
> Any thoughts on how to fix this?  The corner case makes it so  
> ResourceRequested
> isn't as useful as it could be.

ResourceDefaultOwner can be used for this case.

Note that this only allows two levels of priorities, as there's a  
single default owner, usually the power manager. It doesn't allow,  
for example, A always yields to B, B always yields to C. This would  
require knowing *who* requested, though, so being able to tell if  
there are pending requests would be insufficient.

Phil


More information about the Tinyos-devel mailing list